XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Andreas HackSubject: 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

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


XML file before SS

XML file after SS

Jamil TaylorSubject: 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.

Dennis BrothersSubject: 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.

- Dennis Brothers

Tony LavinioSubject: Problem saving file after viewing file in tree tab
Author: Tony Lavinio
Date: 25 Oct 2007 08:39 AM
A patch will be available shortly.

Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.