MemBufInputSource & DOM

Discussion in 'XML' started by Beeblebrox, Apr 2, 2004.

  1. Beeblebrox

    Beeblebrox Guest

    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
     
    Beeblebrox, Apr 2, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thorsten Meininger
    Replies:
    0
    Views:
    448
    Thorsten Meininger
    Jul 28, 2004
  2. Thorsten Meininger
    Replies:
    0
    Views:
    517
    Thorsten Meininger
    Jul 28, 2004
  3. Dingus
    Replies:
    2
    Views:
    3,187
    Dingus
    Nov 15, 2004
  4. mike
    Replies:
    1
    Views:
    1,225
    Martin Honnen
    Nov 20, 2004
  5. Replies:
    0
    Views:
    568
Loading...

Share This Page