* children, depth-first; {@code false} otherwise.
*/
public static void inspectChildren(nsIDOMNode node, boolean recursive) {
boolean has_children = node.hasChildNodes();
if (has_children) {
nsIDOMNodeList children = node.getChildNodes();
long len = children.getLength();
System.out.print("The node has " + len + " children: ");
for (long i = 0; i < len; i++) {
String name = children.item(i).getNodeName();
System.out.print(name + ",");
}
System.out.println();
for (long i = 0; recursive && i < len; i++) {
nsIDOMNode child = children.item(i);
System.out.println("Inspecting children #" + i);
inspect(child, true);
}
}
else {