Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's easy in JS too, just use a DOMParser


That 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


And 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: