xnursinghrde
New Member
I'm using d3.js to parse a large XML file whose xml element order -at one particular element depth- turns out to be critical.Until now, I've been traversing & parsing the data using d3.js, using a hierarchy of selections of the form:\[code\] d3.select(this) .selectAll("<elementname>") .each( function(d) { // same again for each child element. }\[/code\]At a given depth in the element hierarchy, this breaks down (the d3 selections group the data by element name, pulling them out of their natural sequence).In an attempt to overcome this I've tried several d3 selection approaches, but none of are providing the originally ordered list in the form the CSS might imply:
- selectAll("parent *") // ALL children of parent
- selectAll("elementname", "anothername", "yetanothername") // union or logical OR of children
- selectAll("*") // ALL children