{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/10158","labels_url":"https://api.github.com/repos/golang/go/issues/10158/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/10158/comments","events_url":"https://api.github.com/repos/golang/go/issues/10158/events","html_url":"https://github.com/golang/go/issues/10158","id":61050873,"number":10158,"title":"encoding/xml can decode but not encode a DOCTYPE with an internal subset","user":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-13T12:13:48Z","updated_at":"2015-03-13T12:13:48Z","closed_at":null,"body":"1. What version of Go are you using (go version)?\r\n```go version go1.2.1 linux/amd64```\r\n\r\n2. What operating system and processor architecture are you using?\r\n```linux amd64```\r\n\r\n3. What did you do?\r\nhttp://play.golang.org/p/ejQsFQ7BHN\r\n\r\n4. What did you expect to see?\r\n``` EOF ```\r\n\r\n5. What did you see instead?\r\n```xml: EncodeToken of Directive containing > marker```\r\n\r\nIt looks like the test in Encoder.EncodeToken is a little too strict. In general it would be good if the encoder could encode a stream of tokens received from the decoder."}}