[jdom-interest] trivial question

Sreeparna Kundu skundu at insiteobjects.com
Tue Oct 3 06:30:52 PDT 2000


if docXML is the jdom document you have created, you can convert to string as follows,

ByteArrayOutputStream out = new ByteArrayOutputStream();
        
 XMLOutputter fmt = new XMLOutputter();
fmt.output(docXML, out);
return out.toString();

****************************************************************************************************************************************************
Write it on your heart that every day is 
 the best day of the year. 
 --Emerson
****************************************************************************************************************************************************
  ----- Original Message ----- 
  From: Paul Madsen 
  To: jdom-interest at jdom.org 
  Sent: Tuesday, October 03, 2000 6:45 AM
  Subject: [jdom-interest] trivial question


  I want to create a string from a Document object. Is there a quick way
  or must I iterate through the chidlren?

  I can't get XMLOutputter to work, I get complaints about mismatch
  between string and stream.

  As a newbie, I would find more examples of JDOM in action invaluable. So
  far, I'm working off of Elliotte Rusty Harold's presentation. Any other
  collections I'm missing?

  Thanks

  --
  Paul Madsen

  Coventus Intuitive Networks
  340 Terry Fox Drive, Kanata, On, Ca
  K2K 3A2
  e) paul.madsen at coventus.com
  p) (613) 271-0180 x296


  _______________________________________________
  To control your jdom-interest membership:
  http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20001003/d6f7dd7e/attachment.htm


More information about the jdom-interest mailing list