{"action":"created","issue":{"url":"https://api.github.com/repos/gabelerner/canvg/issues/386","labels_url":"https://api.github.com/repos/gabelerner/canvg/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/gabelerner/canvg/issues/386/comments","events_url":"https://api.github.com/repos/gabelerner/canvg/issues/386/events","html_url":"https://github.com/gabelerner/canvg/issues/386","id":93249330,"number":386,"title":"XML5632 in IE 11","user":{"login":"antiremy","id":848627,"avatar_url":"https://avatars.githubusercontent.com/u/848627?v=3","gravatar_id":"","url":"https://api.github.com/users/antiremy","html_url":"https://github.com/antiremy","followers_url":"https://api.github.com/users/antiremy/followers","following_url":"https://api.github.com/users/antiremy/following{/other_user}","gists_url":"https://api.github.com/users/antiremy/gists{/gist_id}","starred_url":"https://api.github.com/users/antiremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antiremy/subscriptions","organizations_url":"https://api.github.com/users/antiremy/orgs","repos_url":"https://api.github.com/users/antiremy/repos","events_url":"https://api.github.com/users/antiremy/events{/privacy}","received_events_url":"https://api.github.com/users/antiremy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-06T10:56:23Z","updated_at":"2015-07-18T18:11:53Z","closed_at":"2015-07-18T18:11:52Z","body":"Whenever I would attempt use canvg on a div that contained two charts, it would work fine in both Chrome and Firefox but Internet Explorer 11 would stop and throw \"XML5632: Only one root element is allowed.\" After a bit of researching, I realized that IE won't allow you to have two <svg> (in this case root)  tags in the XML string. So to fix this, I simply put\r\n\r\n        var findSecondRoot = xml.indexOf(\"<svg\", xml.indexOf(\"<svg\")+1);\r\n        xml = xml.substring(0, findSecondRoot);\r\nat the beginning of the svg.parseXml function, before the if statement.\r\n\r\nI'm just putting this up for reference because I couldn't find a solution on my own.\r\n\r\nEDIT: On second thought, you could also use this to simply fix your content before passing it to canvg. It doesn't necessarily have to be in canvg.js"},"comment":{"url":"https://api.github.com/repos/gabelerner/canvg/issues/comments/122573717","html_url":"https://github.com/gabelerner/canvg/issues/386#issuecomment-122573717","issue_url":"https://api.github.com/repos/gabelerner/canvg/issues/386","id":122573717,"user":{"login":"gabelerner","id":241819,"avatar_url":"https://avatars.githubusercontent.com/u/241819?v=3","gravatar_id":"","url":"https://api.github.com/users/gabelerner","html_url":"https://github.com/gabelerner","followers_url":"https://api.github.com/users/gabelerner/followers","following_url":"https://api.github.com/users/gabelerner/following{/other_user}","gists_url":"https://api.github.com/users/gabelerner/gists{/gist_id}","starred_url":"https://api.github.com/users/gabelerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabelerner/subscriptions","organizations_url":"https://api.github.com/users/gabelerner/orgs","repos_url":"https://api.github.com/users/gabelerner/repos","events_url":"https://api.github.com/users/gabelerner/events{/privacy}","received_events_url":"https://api.github.com/users/gabelerner/received_events","type":"User","site_admin":false},"created_at":"2015-07-18T18:11:52Z","updated_at":"2015-07-18T18:11:52Z","body":"canvg will only support a single root for now. as you said, you can just fix the content. one easy way is to just wrap everything in an `<svg>...</svg>` since the `svg` tag can be nested into itself."}}