[jdom-interest] Need for a SAXBuilder.build(String XMLString) method?

Dennis Sosnoski dms at sosnoski.com
Sun Apr 15 22:48:44 PDT 2001


Use a java.io.StringReader wrapper for your String, and pass the wrapper to the SAX
InputSource constructor.

  - Dennis

James Sinnamon wrote:

> I may have missed something,but as far as I can tell, there doesn't seem to be any
> capability for the build() methods of both SAXBuilder and DOMBuilder classes to
> build documents directly from Strings declared from within the program.
>
> Does anyone else out there think that this might be useful?
>
> For myself, I can see that this would be helpful in writing JUnit tests  for  more
> simple
> cases.  Instead of having to read in from an external file, the whole XML document
> could simply be contained inside a String declared inside the program.
>
> TIA
>
> regards,
>
> James
>
> --
> James Sinnamon  sinnamon at usq.edu.au
>
> ph 07 46315566,  0412 319669
> PO Box 517 Darling Heights QLD 4350
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com




More information about the jdom-interest mailing list