Closed
Description
We are using xmldom to parse, tweak, and serialize some SVG schematics that will ultimately be embedded in HTML (not xhtml) pages. Through 0.6.0, everything was working fine, but starting with 0.7.0, for some but not all documents, when we SerializeToString(doc), all of the elements in the document get prefixed by the svg namespace (xvg:g, etc.) This produces SVG documents that are perfectly legitimate XML but won't display when embedded in HTML5 documents due to HTML rules, which don't include the general XML rules for namespaces.
- What causes xmldom to do this? We didn't discover an identifiable pattern.
- How can we ensure that we get SVG we can use?
Right now we're hacking the results as text to lop off the namespaces so our app will continue to work, but we really don't want to do that.