Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > MemBufInputSource & DOM

Thread Tools

MemBufInputSource & DOM

Posts: n/a

I am trying to read an XML stream from memory using Xerces C++ 2.5 and
I want to use DOM.

Does any one have a working sample code for this? Or any pointers?

Let me try explain some stuff I tried.

MemBufInputSource* memBufIS = new MemBufInputSource
(str2, str2 , gMemBufId , false );

I tried XercesDOMParser parse, and then I tried
DOMNode* m_doc = m_parser->getDocument();
DOMNode* m_docElem = m_doc->getLastChild() ;
I tried m_doc->getDocumentElement(), getFirstChild() also, but
m_docElem always returns NULL

I also tried DOMBuilder using Wrapper4InputSource
Wrapper4InputSource wis(memBufIS,
false,XMLPlatformUtils::fgMemoryManager) ;
but I that throws an unknown exception (neither XMLException or

This code used to work with Xerces 1 but I believe at that version,
MemBufInputSource was a DOM Input type.

thanks in advance,
Reply With Quote

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
Convert a XML DOM Object to a HTML DOM Object XML 0 09-20-2005 08:16 AM
What is the difference between DOM Level 1 and DOM Level 2. mike XML 1 11-20-2004 03:19 PM
Xerces C++: How to make DOM from XML in MemBufInputSource? Dingus XML 2 11-15-2004 09:35 PM
Difference between pure DOM and JAXP over DOM ?? Thorsten Meininger XML 0 07-28-2004 08:51 AM
Difference between pure DOM and JAXP over DOM ?? Thorsten Meininger Java 0 07-28-2004 08:51 AM