%description: Check cXMLElement::getElementByPath(): cannot go above root with ".." %file: test.xml one two three four five six seven eight nine ten ten %global: #ifdef _MSC_VER #pragma warning(disable:4786) #endif static void getElement(cXMLElement *ctx, cXMLElement *root, const char *pathexpr) { cXMLElement *node = ctx->getElementByPath(pathexpr, root, nullptr); EV << (!pathexpr ? "''" : pathexpr) << ": " << (!node ? "null" : node->getAttribute("id")) << "\n"; } %activity: cXMLElement *root = getEnvir()->getXMLDocument("test.xml"); cXMLElement *bar9 = root->getElementById("9"); getElement(bar9, root, "../../.."); getElement(bar9, root, "../../../foo"); %contains: stdout ../../..: null ../../../foo: null