diff options
author | Stef Walter <stef@memberwebs.com> | 2004-07-27 21:34:03 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-07-27 21:34:03 +0000 |
commit | 61ff9cee67228fd5b430eb929687ca0cac992a7c (patch) | |
tree | 73e27790adf037ce31280ae92e67d494983d18bd /src/domhelpers.cpp | |
parent | d2105fb3fb2082bb32875eaab6db6a2c04c7eae5 (diff) |
- Element comparison fixes
- Other XML fixup fixes
Diffstat (limited to 'src/domhelpers.cpp')
-rw-r--r-- | src/domhelpers.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |