summaryrefslogtreecommitdiff
path: root/src/domhelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/domhelpers.cpp')
-rw-r--r--src/domhelpers.cpp8
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;
}