Create a DOM document from an XML string (Xerces-C++ 2.5)

Discussion in 'XML' started by johnmmcparland, Apr 29, 2009.

  1. Hi all,

    I have a std::string which is the XML I need to parse. I have already
    got everything I need to parse the string (as I do the same thing from
    a file), but I cannot seem to create a DOMDocument from it.

    So I have;

    std::string xml = "
    <person>
    <name>Bill</name>
    <age>30</age>
    <attributes>
    <pair>
    <key>EMAIL</key>
    <value>kidonATnoreal.email</value>
    </pair>
    </attributes>
    </person>";

    So how do I create the DOMDocument?

    I'm using xerces-c++2.5
     
    johnmmcparland, Apr 29, 2009
    #1
    1. Advertisements

  2. Joe Kesselman, Apr 30, 2009
    #2
    1. Advertisements

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:
    956
    Helen
    Mar 2, 2004
  2. bugbear
    Replies:
    0
    Views:
    1,277
    bugbear
    Aug 28, 2003
  3. Tony Prichard
    Replies:
    0
    Views:
    1,026
    Tony Prichard
    Dec 12, 2003
  4. Kevin Partin
    Replies:
    1
    Views:
    1,665
    Martin Honnen
    Feb 13, 2004
  5. Manish Hatwalne
    Replies:
    1
    Views:
    602
    Martin Honnen
    Jul 13, 2004
  6. Dingus
    Replies:
    2
    Views:
    3,730
    Dingus
    Nov 15, 2004
  7. Anthony Mak
    Replies:
    1
    Views:
    709
    Johannes Koch
    Feb 10, 2005
  8. Johannes Bauer
    Replies:
    7
    Views:
    1,270
    Johannes Bauer
    Jun 11, 2009
Loading...