Subject:Problem saving file after viewing file in tree tab Author:Andreas Hack Date:19 Oct 2007 03:35 AM Originally Posted: 18 Oct 2007 01:23 PM
Hi,
I open an XML file in Styles Studio, go to the tree view tab and expand the first level of the XML doc. I do not edit the file! Then I save the (unchanged) file.
If I take a look at the file in a hex editor I can see now, that non-printable characters have been added at the beginning of the file.
This file is then not processable by applications (example error message: org.xml.sax.SAXParseException: Content is not allowed in prolog.)
As an example I attached the file before opening in SS and after saving it from tree view.
Stylus Studio 2007, XML Enterprise Suite, Release 2.
Framework version: Build 894m
Subject:Problem saving file after viewing file in tree tab Author:Jamil Taylor Date:19 Oct 2007 06:47 AM Originally Posted: 19 Oct 2007 06:33 AM
The file has been saved as unicode (utf-8). What you are seeing is the Windows byte order marker. Your XML file does not include a declaration for the encoding. If you add that to it, the problem may go away.
Note that there are some Java XML parsers that cannot handle the Windows BOM. I think by now, many can. Worst case scenario is to simply change the encoding to ASCII.
Subject:Problem saving file after viewing file in tree tab Author:Dennis Brothers Date:23 Oct 2007 09:46 AM
The problem also exists if you save from grid view, and it does _not_ go away if you have single-byte encoding (like ISO-8859-1) specified. It is clearly a bug.
This is most annoying, especially since any column rearranging you've done in grid view is lost when you switch to text view to delete the BOM and do the save.