DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6841>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6841

maybe CDATA section parsing bug...

           Summary: maybe CDATA section parsing bug...
           Product: Xerces2-J
           Version: 2.0.0
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: DOM
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I've tested with following xml document.

<?xml version="1.0" encoding="UTF-8"?>
<c21:description xmlns:c21="somenamespace">
        <c21:desc1>
                <![CDATA[Hohohoho]]></c21:desc1>
        <c21:desc2>
                <![CDATA[Hahahaha]]></c21:desc2>
        <c21:desc3>
                <![CDATA[Hihihihi]]></c21:desc3>
        <c21:desc3>
                <![CDATA[This is
                Problem...]]></c21:desc3>
</c21:description>

make DOM and serialize it.

DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
dfactory.setNamespaceAware(true);
DocumentBuilder builder = dfactory.newDocumentBuilder();
Document doc = builder.parse(new File(args[0]));
// serialize...

Then, these documents are shown.

<?xml version="1.0" encoding="UTF-8"?>
<c21:description xmlns:c21="somenamespace">
        <c21:desc1>
                <![CDATA[Hohohoho]]></c21:desc1>
        <c21:desc2>
                <![CDATA[Hahahaha]]></c21:desc2>
        <c21:desc3>
                <![CDATA[Hihihihi]]></c21:desc3>
        <c21:desc3>
                <![CDATA[HohohohoHahahahaHihihihiThis is
                Problem...]]></c21:desc3>
</c21:description>

-------------------------------------------------------

the key point is first, second CDATA has no newline character,
and third has one.
When I test this in xerces2-j beta3, it works well..

Thanks for reading...
bye...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to