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

D

Dingus

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::parseURI, that would ge grossly
inefficient.

Thanks,
Tim
 
S

Steve W. Jackson

: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::parseURI, 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 =
 
D

Dingus

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top