antchfx / xmlquery

xmlquery is Golang XPath package for XML query.
https://github.com/antchfx/xpath
MIT License
444 stars 89 forks source link

If `<! [CDATA[` is preceded by another value, it will affect the outputxml #83

Closed laojianzi closed 2 years ago

laojianzi commented 2 years ago

ref test: https://github.com/antchfx/xmlquery/issues/36#issue-685474347

for example, before

<?xml version="1.0"?>
    <rss version="2.0" xmlns="http://www.example.com/" xmlns:dc="https://purl.org/dc/elements/1.1/">
    <dc:creator> other value <![CDATA[Richard Lawler]]></dc:creator>
</rss>

after OutputXML()

<?xml version="1.0"?>
    <rss version="2.0" xmlns="http://www.example.com/" xmlns:dc="https://purl.org/dc/elements/1.1/">
    <dc:creator>other valueRichard Lawler</dc:creator>
</rss>