We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3121eb7 commit 6f3bcd7Copy full SHA for 6f3bcd7
Chapter14/src/main/java/com/packtpub/recursion/XmlTraverser.java
@@ -46,17 +46,13 @@ public void indent(int indentation) {
46
}
47
48
public void traverseNode(Node node, int indentation) {
49
-
50
indent(indentation);
51
System.out.print(node.getNodeName() + " ");
52
53
if (node.hasChildNodes()) {
54
indentation += 2;
55
56
NodeList children = node.getChildNodes();
57
for (int i = 0; i < children.getLength(); i++) {
58
Node child = children.item(i);
59
60
if (child.getNodeType() == Node.TEXT_NODE) {
61
printText( child.getTextContent() );
62
} else {
0 commit comments