by edgarbob · 12y ago · 0 comments
See this blog post I wrote a while ago for an example: http://jeroenjanssens.com/2013/09/19/seven-command-line-tool...
[ {"tag":"something", "attributes": { ... }, "nodes": [ ...] }, ... ]
with nodes being objects with one key to indicate if the node is a text node or an element, and if a text node then a value, and so on.http://www.w3.org/Tools/HTML-XML-utils/
However, I just use a Ruby script which loads the Nokogiri library:
https://github.com/clarkgrubb/data-tools/blob/master/src/dom...
https://github.com/clarkgrubb/data-tools/blob/master/doc/dom...