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