From 61ff9cee67228fd5b430eb929687ca0cac992a7c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 27 Jul 2004 21:34:03 +0000 Subject: - Element comparison fixes - Other XML fixup fixes --- src/domhelpers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/domhelpers.cpp') diff --git a/src/domhelpers.cpp b/src/domhelpers.cpp index 4836d17..9a9cfd2 100644 --- a/src/domhelpers.cpp +++ b/src/domhelpers.cpp @@ -50,7 +50,7 @@ bool DOMHelpers::isElement(const DOM::Node& node, const string& name) bool DOMHelpers::isEqualElement(const DOM::Element& el1, const DOM::Element& el2) { - if(el1.getNodeName() == el2.getNodeName()) + if(el1.getNodeName() != el2.getNodeName()) return false; // Compare attributes @@ -67,14 +67,14 @@ bool DOMHelpers::isEqualElement(const DOM::Element& el1, const DOM::Element& el2 for(int i = 0; i < at1->getLength(); i++) { DOM::Attr attr1 = (const DOM::Attr&)at1->item(0); - if(attr1 != NULL) + if(attr1 == NULL) return false; DOM::Attr attr2 = (const DOM::Attr&)at2->getNamedItem(attr1.getNodeName()); - if(attr2 != NULL) + if(attr2 == NULL) return false; - if(attr1.getNodeValue() == attr2.getNodeValue()) + if(attr1.getNodeValue() != attr2.getNodeValue()) return false; } -- cgit v1.2.3