[ http://issues.apache.org/jira/browse/XMLBEANS-281?page=comments#action_12425415 ] Wing Yew Poon commented on XMLBEANS-281: ----------------------------------------
PrettyPrinter basically parses each xml file you give it into an XmlObject and calls save() on the XmlObject with a pretty print option. My comment about the character escaping applies to XmlObject save() and xmlText() generally, with or without the pretty print. As for your observation that pretty printing changes the content of the xml, that is precisely the intent. Pretty printing may add or remove whitespace in the xml content. E.g., if you pretty printed <Property name="Test"> <Value>less than is < greater than is > </Value> </Property> you get <Property name="Test"> <Value>less than is < greater than is ></Value> </Property> That is definitely not equivalent as xml to the original. However, <Property name="Test"> <Value>less than is < greater than is > </Value> </Property> is equivalent to the original. > org.apache.xmlbeans.impl.tool.PrettyPrinter does not honour > > ---------------------------------------------------------------- > > Key: XMLBEANS-281 > URL: http://issues.apache.org/jira/browse/XMLBEANS-281 > Project: XMLBeans > Issue Type: Bug > Components: Tools > Affects Versions: Version 2.2 > Environment: Windows XP, Intel P4, (I don't think this should matter) > Reporter: Ragunath Ramaswamy > > I have an xml as > <Property name="Test"> > <Value>less than is < greaterthan is ></Value> > </Property> > when I use this as an input to the xpretty command line tool to give the > pretty printed output I get the result as > <Property name="Test"> > <Value>less than is < greaterthan is ></Value> > </Property> > I find that the xml escape characters for > are posing an issue here. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]