toString() differs from save()

"Nick de Graeve" <[email protected]>
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
When I save my XMLBean to disk I get a slightly different result from when I do a toString() or xmlText().
The formatting and contents are the same but the file on disk starts with

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

while the string does not.

How can I make sure both are exactly the same?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.