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

Comments

Projects
None yet
2 participants
@gopherbot
Copy link

gopherbot commented Nov 13, 2009

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

This comment has been minimized.

Copy link
Contributor

rsc commented Nov 13, 2009

Comment 1:

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Nov 14, 2009

Comment 2:

This issue was closed by revision bad9738.

Status changed to Fixed.

Merged into issue #-.

@gopherbot gopherbot added the fixed label Nov 14, 2009

@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.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.