How to get an xml subtree using DOM using xerces?

Discussion in 'XML' started by Anthony Mak, Feb 10, 2005.

  1. Anthony Mak

    Anthony Mak Guest

    Hi all,

    I am using Xerces DOM library. I want to get a subtree (everything
    including the tags ) from an xml document as a string ( and save this
    subtree into a xml/text file). Currently I am using the TreeWalkerImpl
    class and nextSibling() and getCurretnNode() to traverse the xml tree.

    (The reason why I want to do this is I needed to get the subtree as an
    xml file to feel it to a Mathml to image converter program.)

    Much appreciate if you can send me some codes or point me which
    methods I need to use. Thanks!!

    Please reply to as well :-

    ^_^

    Anthony Mak
     
    Anthony Mak, Feb 10, 2005
    #1
    1. Advertising

  2. Anthony Mak wrote:
    > Hi all,
    >
    > I am using Xerces DOM library. I want to get a subtree (everything
    > including the tags ) from an xml document as a string ( and save this
    > subtree into a xml/text file).


    Have a look at the serializers in
    <http://xml.apache.org/xerces2-j/javadocs/other/org/apache/xml/serialize/package-summary.html>.


    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
     
    Johannes Koch, Feb 10, 2005
    #2
    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:
    821
    Helen
    Mar 2, 2004
  2. bugbear
    Replies:
    0
    Views:
    1,019
    bugbear
    Aug 28, 2003
  3. cvissy
    Replies:
    0
    Views:
    609
    cvissy
    Nov 16, 2004
  4. Florian Lindner

    Cut out XML subtree

    Florian Lindner, Aug 29, 2012, in forum: Python
    Replies:
    0
    Views:
    185
    Florian Lindner
    Aug 29, 2012
  5. Andreas Perstinger

    Re: Cut out XML subtree

    Andreas Perstinger, Aug 29, 2012, in forum: Python
    Replies:
    0
    Views:
    198
    Andreas Perstinger
    Aug 29, 2012
Loading...

Share This Page