MemBufInputSource & DOM

B

Beeblebrox

Hello,

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
DOMException)


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

thanks in advance,
Beeblebrox
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top