Xerces C++: How to make DOM from XML in MemBufInputSource?

Discussion in 'XML' started by Dingus, Nov 12, 2004.

  1. Dingus

    Dingus Guest

    I have XML in a string/memory buffer, which I converted to a
    MemBufInputSource. I would like to make a DOM from this data, but I
    cannot see how to do this.

    Is there a way to easily create a DOM from memory/MemBufInputSource
    much like the way the DOMCount example creates the DOM from an xml
    file? I don't want to write the memory to a file then pass the
    filename that to DOMBuilder::parseURI, that would ge grossly
    inefficient.

    Thanks,
    Tim
     
    Dingus, Nov 12, 2004
    #1
    1. Advertising

  2. In article <>,
    (Dingus) wrote:

    >:I have XML in a string/memory buffer, which I converted to a
    >:MemBufInputSource. I would like to make a DOM from this data, but I
    >:cannot see how to do this.
    >:
    >:Is there a way to easily create a DOM from memory/MemBufInputSource
    >:much like the way the DOMCount example creates the DOM from an xml
    >:file? I don't want to write the memory to a file then pass the
    >:filename that to DOMBuilder::parseURI, that would ge grossly
    >:inefficient.
    >:
    >:Thanks,
    >:Tim


    I use Xerces in its Java form instead, so I'm not familiar with the C++
    version, nor do I know precisely what a MemBufInputSource might be. But
    I know that we've parsed a String into a DOM object directly from the
    clipboard. To do that, we reference what's in the clipboard as an
    InputStream object (a stream of bytes), which can be parsed directly by
    a DOMParser.

    HTH.

    = Steve =
    --
    Steve W. Jackson
    Montgomery, Alabama
     
    Steve W. Jackson, Nov 12, 2004
    #2
    1. Advertising

  3. Dingus

    Dingus Guest

    > I use Xerces in its Java form instead, so I'm not familiar with the C++
    > version, nor do I know precisely what a MemBufInputSource might be. But
    > I know that we've parsed a String into a DOM object directly from the
    > clipboard. To do that, we reference what's in the clipboard as an
    > InputStream object (a stream of bytes), which can be parsed directly by
    > a DOMParser.
    >
    > HTH.
    >
    > = Steve =


    Thanks Steve. I ended up using the results of a XERCES parse to
    create the new Xerces DOM.

    Tim
     
    Dingus, Nov 15, 2004
    #3
    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. Helen
    Replies:
    0
    Views:
    847
    Helen
    Mar 2, 2004
  2. bugbear
    Replies:
    0
    Views:
    1,069
    bugbear
    Aug 28, 2003
  3. Beeblebrox

    MemBufInputSource & DOM

    Beeblebrox, Apr 2, 2004, in forum: XML
    Replies:
    0
    Views:
    755
    Beeblebrox
    Apr 2, 2004
  4. cvissy
    Replies:
    0
    Views:
    638
    cvissy
    Nov 16, 2004
  5. Anthony Mak
    Replies:
    1
    Views:
    637
    Johannes Koch
    Feb 10, 2005
Loading...

Share This Page