Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/xml: Error parsing XML with CDATA #128

Closed
gopherbot opened this issue Nov 13, 2009 · 2 comments
Closed

encoding/xml: Error parsing XML with CDATA #128

gopherbot opened this issue Nov 13, 2009 · 2 comments

Comments

@gopherbot
Copy link

by abhinav.g90:

What steps will reproduce the problem?
Parse an XML file with a <![CDATA[ section.

What is the expected output? What do you see instead?
Expect successful parse. 
Get:
XML syntax error: invalid <![ sequence

What is your $GOOS? $GOARCH?
$GOOS = darwin
$GOOARCH = 386

Which revision are you sync'ed to?  (hg log -l 1)
changeset:   4018:bbc290c53f85
tag:         tip

Please provide any additional information below.

The attached .go file has the following XML. It should successfully parse
by using xml.Unmarshal and the types defined but it gets a syntax error.

<?xml version="1.0" encoding="utf-8"?>
<rss>
    <channel>
        <item>
            <title>Go</title>
            <link>http://golang.org/<;/link>
            <description><![CDATA[
                The Go language home page
            ]]></description>
        </item>
        <item>
            <title>Test Page</title>
            <link>http://somesite/<;/link>
            <description><![CDATA[
                CONTENTS
            ]]></description>
        </item>
    </channel>
</rss>

Attachments:

  1. xmltest.go (1093 bytes)
@rsc
Copy link
Contributor

rsc commented Nov 13, 2009

Comment 1:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 14, 2009

Comment 2:

This issue was closed by revision bad9738.

Status changed to Fixed.

Merged into issue #-.

@mikioh mikioh changed the title Error parsing XML with CDATA (xml package) encoding/xml: Error parsing XML with CDATA Jan 9, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants