[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Commented: (XMLBEANS-281)
From:       "Wing Yew Poon (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2006-08-03 0:52:14
Message-ID: 20899017.1154566334799.JavaMail.jira () brutus
[Download RAW message or body]

    [ 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 &lt; greater than is &gt;
  </Value>
</Property>
you get
<Property name="Test">
  <Value>less than is &lt; greater than is ></Value>
</Property>
That is definitely not equivalent as xml to the original.
However,
<Property name="Test">
    <Value>less than is &lt; greater than is >
  </Value>
</Property>
is equivalent to the original.


> org.apache.xmlbeans.impl.tool.PrettyPrinter does not honour &gt;
> ----------------------------------------------------------------
> 
> 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 &lt; greaterthan is &gt;</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 &lt; 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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic