[jdom-interest] Snippets

Eric Rosenberg eric at computerwizards.com
Wed Jun 13 08:00:48 PDT 2001


I'm using JDOM to build an XML document programatically. I've run across
the need to insert small strings containing snippets of XML into my
document. What is the correct way to turn the little strings into JDOM
Elements that I can add to my document?

Currently I'm creating a StringWriter and passing that to a SAXBuilder,
getting the root element from the resulting document and calling
clone(). I figure there has to be a better way.


More information about the jdom-interest mailing list