Lines Matching refs:node2
116 private void diffLog(String errMsg, Node node1, Node node2) { in diffLog() argument
128 if (node2 != null) { in diffLog()
129 node2Str = "[Type]:" + nodeInfo(node2) + in diffLog()
130 " [Name]:" + node2.getNodeName(); in diffLog()
131 if (node2.getNodeValue() != null) in diffLog()
132 node2Str += " [Value]:" + node2.getNodeValue(); in diffLog()
198 private boolean attributesEqual(Node node1, Node node2) { in attributesEqual() argument
202 private boolean compareNode(Node node1, Node node2) { in compareNode() argument
207 if (node1 == null && node2 == null) { in compareNode()
210 } else if (node1 == null || node2 == null) { in compareNode()
211 diffLog("DIFF: one of the node is null", node1, node2); in compareNode()
215 if (node1.getNodeType() != node2.getNodeType()) { in compareNode()
216 diffLog("DIFF: nodetype is different", node1, node2); in compareNode()
220 if (node1.getNodeName() == null && node2.getNodeName() == null) { in compareNode()
223 node2.getNodeName() == null) { in compareNode()
224 diffLog("DIFF: one of the nodeName is null", node1, node2); in compareNode()
226 } else if (!node1.getNodeName().equals(node2.getNodeName())) { in compareNode()
227 diffLog("DIFF: nodeName is different", node1, node2); in compareNode()
232 diffLog("DIFF: Some tag(s) is ignored", node1, node2); in compareNode()
237 if (node1.getNodeValue() == null && node2.getNodeValue() == null) { in compareNode()
240 node2.getNodeValue() == null) { in compareNode()
241 diffLog("DIFF: one of the nodevalue is null", node1, node2); in compareNode()
243 } else if (!node1.getNodeValue().equals(node2.getNodeValue())) { in compareNode()
244 diffLog("DIFF: nodeValue is different", node1, node2); in compareNode()
249 if (!attributesEqual(node1, node2)) in compareNode()
253 NodeList node2Children = node2.getChildNodes(); in compareNode()
262 diffLog("DIFF: one node's children is null", node1, node2); in compareNode()
267 diffLog("DIFF: num of children is different", node1, node2); in compareNode()