Menu

#12 Issue when parsing CDATA

1.0
closed
cdata (1)
2017-08-27
2017-02-02
No

When trying to parse a CDATA section that contains JSON with a list inside a list

Eg:

<?xml version="1.0" encoding="UTF-8" ?>
<Test>
<Description>
<![CDATA["Test":["First" : ["Element1", "Element2"]]
]]>
</Description></Test>

VTDGen.parse() outputs
com.ximpleware.ParseException: Error in CDATA: Invalid termination sequence

The problem occurs when there is a "\n" after the pair or "]"

Eg:

<?xml version="1.0" encoding="UTF-8" ?>
<Test>
<Description>
<![CDATA[Test]]
]]>
</Description></Test>

This example works fine:

<?xml version="1.0" encoding="UTF-8" ?>
<Test>
<Description>
<![CDATA[Test]]]]>
</Description>
</Test>

Discussion

  • jimmy zhang

    jimmy zhang - 2017-02-10

    yes this bug is now fixed... check out the latest vtdGen.java

     
  • jimmy zhang

    jimmy zhang - 2017-08-27
    • labels: --> cdata
    • status: open --> closed
    • assigned_to: jimmy zhang
     

Log in to post a comment.

MongoDB Logo MongoDB