xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Gris" <michael.g...@autodesk.com>
Subject RE: save methods question
Date Wed, 31 Mar 2004 18:41:33 GMT
Maren,

Saving using a Writer will not add the XML declaration and nor will it
honour any encoding that might be specified by an XMLOptions.  This is
as designed.  For more info you can read the now-closed bug
http://nagoya.apache.org/jira/browse/XMLBEANS-10.

So in short, always save using an OutputStream.

-michael

> -----Original Message-----
> From: starlightpurple [mailto:starlightpurple@yahoo.com] 
> Sent: Wednesday, March 31, 2004 11:30 AM
> To: xmlbeans-user@xml.apache.org
> Subject: save methods question
> 
> 
> Hi, 
> 
> I am a new user to xmlbeans.  When I do a save(File) I
> get the <?xml version="1.0" encoding="UTF-8"?> at the
> top of my xml file. 
> 
> However, if I do a save(Writer) I do NOT get the <?xml
> version="1.0" encoding="UTF-8"?>. 
> 
> Why is this occuring? Is there a way to get the <?xml
> version="1.0" encoding="UTF-8"?> with the save(Writer)
> method? 
> 
> I tried using the toString() and xmlText() methods but
> they did not include the <?xml ...> either. 
> 
> Thanks! 
> 
> Maren
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> 
> - 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
> 
> 

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message