You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Eric Vasilik <er...@bea.com> on 2004/04/01 02:39:40 UTC

RE: save methods question

When the saver produces bytes, I save out the XML declaration so that I
can describe the encoding that was used.  Saving out to a file is to
save out bytes, this is why you get the decl.  However, when producing
chars, no encoding is performed, so I don't need to save it out in the
decl.  This is why you see this difference.

- Eric

-----Original Message-----
From: starlightpurple [mailto:starlightpurple@yahoo.com] 
Sent: Wednesday, March 31, 2004 10: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/