return false;\r
}\r
\r
-bool hasParentRecursive(xmlNodePtr theNode, const std::vector<const char*>& theNodeNames)\r
+xmlNodePtr hasParentRecursive(xmlNodePtr theNode, const std::vector<const char*>& theNodeNames)\r
{\r
if (!hasParent(theNode)) {\r
- return false; // have no parents at all\r
+ return 0; // have no parents at all\r
}\r
xmlNodePtr aNode = theNode->parent;\r
const xmlChar* aName = aNode->name;\r
if (!aName || !isElementNode(aNode)) {\r
- return false;\r
+ return 0;\r
}\r
for (size_t anIndex = 0; anIndex < theNodeNames.size(); ++anIndex) {\r
if (!xmlStrcmp(aName, (const xmlChar *) theNodeNames[anIndex]))\r
- return true;\r
+ return aNode;\r
}\r
return hasParentRecursive(aNode, theNodeNames);\r
}\r
\r
-bool hasParentRecursive(xmlNodePtr theNode, const char* theNodeName, ...)\r
+xmlNodePtr hasParentRecursive(xmlNodePtr theNode, const char* theNodeName, ...)\r
{\r
std::vector<const char*> aNodeNames;\r
va_list args; // define argument list variable\r