Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Xerces C++: How to make DOM from XML in MemBufInputSource?

Reply
Thread Tools

Xerces C++: How to make DOM from XML in MemBufInputSource?

 
 
Dingus
Guest
Posts: n/a
 
      11-12-2004
I have XML in a string/memory buffer, which I converted to a
MemBufInputSource. I would like to make a DOM from this data, but I
cannot see how to do this.

Is there a way to easily create a DOM from memory/MemBufInputSource
much like the way the DOMCount example creates the DOM from an xml
file? I don't want to write the memory to a file then pass the
filename that to DOMBuilder:arseURI, that would ge grossly
inefficient.

Thanks,
Tim
 
Reply With Quote
 
 
 
 
Steve W. Jackson
Guest
Posts: n/a
 
      11-12-2004
In article <(E-Mail Removed) >,
http://www.velocityreviews.com/forums/(E-Mail Removed) (Dingus) wrote:

>:I have XML in a string/memory buffer, which I converted to a
>:MemBufInputSource. I would like to make a DOM from this data, but I
>:cannot see how to do this.
>:
>:Is there a way to easily create a DOM from memory/MemBufInputSource
>:much like the way the DOMCount example creates the DOM from an xml
>:file? I don't want to write the memory to a file then pass the
>:filename that to DOMBuilder:arseURI, that would ge grossly
>:inefficient.
>:
>:Thanks,
>:Tim


I use Xerces in its Java form instead, so I'm not familiar with the C++
version, nor do I know precisely what a MemBufInputSource might be. But
I know that we've parsed a String into a DOM object directly from the
clipboard. To do that, we reference what's in the clipboard as an
InputStream object (a stream of bytes), which can be parsed directly by
a DOMParser.

HTH.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
 
Reply With Quote
 
 
 
 
Dingus
Guest
Posts: n/a
 
      11-15-2004
> I use Xerces in its Java form instead, so I'm not familiar with the C++
> version, nor do I know precisely what a MemBufInputSource might be. But
> I know that we've parsed a String into a DOM object directly from the
> clipboard. To do that, we reference what's in the clipboard as an
> InputStream object (a stream of bytes), which can be parsed directly by
> a DOMParser.
>
> HTH.
>
> = Steve =


Thanks Steve. I ended up using the results of a XERCES parse to
create the new Xerces DOM.

Tim
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a DOM document from an XML string (Xerces-C++ 2.5) johnmmcparland XML 1 04-30-2009 01:57 AM
How to get an xml subtree using DOM using xerces? Anthony Mak XML 1 02-10-2005 09:11 AM
Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2 cvissy XML 0 11-16-2004 07:06 AM
Validating XML using the Xerces DOM parser Helen Java 0 03-02-2004 12:37 AM
parsing XML to DOM, validating against a local DTD, using Xerces under JAXP? bugbear XML 0 08-28-2003 09:22 AM



Advertisments