diff --git a/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp b/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp old mode 100755 new mode 100644 index c0398962ec..1c4907199b --- a/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +++ b/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp @@ -147,7 +147,13 @@ std::vector XPath::evaluate(ParseTree *t) { } } i++; - work = next; + // remove duplicated element + work.clear(); + for (unsigned int i=0; i < next.size(); i++ ){ + if (std::find(work.begin(),work.end(),next[i]) == std::end(work)) { + work.push_back(next[i]); + } + } } return work;