3 ms·
The fact that it's XML is not super relevant -- what you're working with in code is a tree structure that may as well be JSON or YAML This is essentially a way
by gavinray 4y ago
The fact that it's XML is not super relevant -- what you're working with in code is a tree structure that may as well be JSON or YAML
This is essentially a way to write grammars for things and get the ability to parse them as trees in a common format that is interchangeable with things like JSON.
I honestly don't see much of a difference between this, and something like a PEG grammar where you do this:
let parsed = peg.parse(input, grammar)
let xml = json2xml(parsed)