Converting XML Document to String

Discussions

XML & Web services: Converting XML Document to String

  1. Converting XML Document to String (3 messages)

    Hi,

    I have created a XML Document in memory (class of org.w3c.dom.Document). I would like to get a string represenation of this. I was just wondering if there are somthing in the api I can use so I wouldn't have to write out a new one.

    Thanks for any advise.

    Threaded Messages (3)

  2. Apache[ Go to top ]

    Use the Apache XMLSerializer

    here's an example:

    http://www.informit.com/articles/article.asp?p=31349&seqNum=3&rl=1
  3. Use an empty Transformer object[ Go to top ]

    Just obtain an empty Transformer from factory and you get going
  4. Converting XML Document to String[ Go to top ]

    Thanks for the help!!
    Charlie