[jdom-interest] XMLOutputter Question

Alex Rosen arosen at novell.com
Wed Nov 19 07:39:14 PST 2003

BTW whether or not the input file has this XML declaration, you'll get the same behavior. Unfortunately the underlying XML parser doesn't tell JDOM about this header, so JDOM doesn't know if it was there in the original document or not. You can choose to output the header or not, based on setOmitDeclaration(), but not based on whether the original document had it.

Alex Rosen
Novell, Inc.

>>> "Hainer, Neil" <hainern at jivanet.net> 11/18/2003 7:41:49 PM >>>
Your correct.  I was outputting the root element instead of the document.


-----Original Message-----
From: Per Norrman [mailto:pernorrman at telia.com] 
Sent: Tuesday, November 18, 2003 7:21 PM
To: Hainer, Neil; jdom-interest at jdom.org 
Subject: SV: [jdom-interest] XMLOutputter Question

Two possible explanations:

1. You call

2. You're not outputting the document, but rather
the root element.


-----Ursprungligt meddelande-----
Från: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org] 
För Hainer, Neil
Skickat: den 18 november 2003 23:53
Till: jdom-interest at jdom.org 
Ämne: [jdom-interest] XMLOutputter Question


I am reading in an XML document and writing it out using XMLOutputter().
The input document contains 

"<?xml version "1.0" encoding = "UTF-8"?>

as the first line.  The output file does not contain this line.  Can
someone tell me why?  Is there a way to retain it?



Neil Hainer
Booz | Allen | Hamilton
8613 Lee Hwy
Fairfax, VA 22031

To control your jdom-interest membership:

To control your jdom-interest membership:

More information about the jdom-interest mailing list