nashwaan/xml-js

Allow parsing non-compliant XML with spaces in tags

Opened this issue · 1 comments

We recently found an API which returned mostly-compliant XML, but one tag was provided with spaces in it, e.g. <some tag>...</some tag>. While this isn't compliant XML, it would be useful to be able to still parse this XML despite the parsing error, maybe with an optional setting.

It's understandable if you don't want to do this, though, as this is still invalid XML.

{
  "some tag": "...",
  "#omit-xml-declaration": "yes"
}

may be converted to xml

<some__EA__tag>...</some__EA__tag>