[ 
https://issues.apache.org/jira/browse/XMLBEANS-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Beeker resolved XMLBEANS-471.
-------------------------------------
    Fix Version/s: Version 5.1.0
       Resolution: Not A Problem

I've tried it with the following snipplet. The error doesn't occur anymore, 
i.e. apart of line-endings the contents match.
We've replace Piccolo a while back, which might have been the source of this 
problem.

{{try (FileInputStream fis = new FileInputStream("Test.xml");}}
{{    FileOutputStream fos = new FileOutputStream("Text.out.xml");}}
{{    OutputStreamWriter osw = new OutputStreamWriter(fos, 
StandardCharsets.UTF_8)) {}}
{{    XmlObject xo = XmlObject.Factory.parse(fis);}}
{{    osw.write(xo.xmlText());}}
{{}}}

> toString() and xmlText() break when "<\" appears at specific position with a 
> &amp; in the value of the tag.
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: XMLBEANS-471
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-471
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>         Environment: Windows, Unix, JAVA.
>            Reporter: Sweta Dhanuka
>            Priority: Major
>             Fix For: Version 5.1.0
>
>         Attachments: Test.xml
>
>
> I am trying to convert a an XMLObject to a String. I tried using both the 
> toString() and xmltext() methods. They work fine in most of the cases, but it 
> seems they garble up the xml when converting to String when certain 
> conditions are met. The conditions are:
>  - the closing tag ("<\" ) starts right after the 131072(i.e.,128K) character 
>  - the text value preceding the "<\" characters has a special character such 
> as &amp;
>  - there are more than 3 characters between the special character and the 
> closing tag. 
> If these conditions are met, then the text 3 characters after the special 
> character, till teh closing tag "<\" is overlayed at the start of the string..



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to