Improve X(HT)ML support
domenic opened this issue · 4 comments
Our goal is to be as good as browsers, but no better. In particular, we are not an arbitrary XML DOM. But, we do need to switch parsing modes, produce XmlDocuments, etc. Lots of work to do. @Sebmaster has been leading the charge on this.
👍 thanks for keeping xHTML in mind!
This would be very nice. Currently the only option for parsing XML in Node is xml2js, which is a pain to work with. I would much rather work with true Nodes like defined in the DOM standard.
Is that possible with the current version of JSDOM?
@felixfbecker We don't have proper XHTML support, but if you only need to get XML into a DOM-like structure to be able to query it, you can set parsingMode: "xml"
, which should work - there might be XML features we don't (yet) support though.
With the addition of strict XHTML parsing, I am going to consider this closed. Other bugs in the x(h)tml tag track specific issues; there definitely are some left.