[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.

Thanks.

-----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
	XMLOutputter#setOmitDeclaration(true);

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

/pmn



-----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


Hi,

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?

TIA,

Neil

Neil Hainer
Booz | Allen | Hamilton
JIVA SI
8613 Lee Hwy
Fairfax, VA 22031
703-289-3881

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@you 
rhost.com

_______________________________________________
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