Solved
Forum Discussion
nmrao
9 years agoCommunity Hero
Would you mind to explain what exactly you are trying to achieve? or why do you want to do so? Reason being, if we know the object, there could be alternate better solutions.
This is similar to https://stackoverflow.com/questions/36179764/get-path-to-all-xmls-nodes
private static String getXPath(node) { if (node.parent().name() == node.name()) { return node.name() } return getXPath(node.parent()) + "/" + node.name() }
then use
output << getXPath(node)+'='+node.text()