3 ms·
It's easy in JS too, just use a DOMParser
by easrng 5y ago
It's easy in JS too, just use a DOMParser
- no_wizard 5y agoThat is not a JavaScript API, that’s a DOM only API, meaning it’s not reproduced in the language spec. This is important because it won’t work in Node, for example, without a 3rd party library or someone implementing it in Node core. JSON however is supported in the language spec
- oaiey 5y agoAnd DOM API is an example of bad API design. Compare that to a modern XML API (like .NET System.Xml.XDocument) and you never want to see Dom again