You want to look at class MemBufInputSource, which is in the src/internal
directory.  It is used in with the SAX parser in the sample
xml-xerces/c/samples/MemParse.  I use it with DOMParser in a Xalan sample,
in xml-xalan/c/samples/XPathWrapper.

Without error handling, etc., the code looks like this:

XMLByte* buf = ....
size_t buflen = .....

MemBufInputSource inStream(buf, buflen, "foo", false);

DOMParser parser;
parser.parse(inStream);

DOM_Document doc = parser.getDocument();


-Rob



Ed Draper wrote:

>I want to pass in a byte stream of XML data and receive a DOM_Document in
>return.



Reply via email to