In Javascript, we have evaluate()
in Document Object but not in Node. I need to get a node from the document and I will get its sub node and everything based on Xpath. In that level 2 node I need to make changes and it should reflect in root parent document.
If I convert the node to document, then any changes I do in the new document will not reflect in original parent document.
In simple terms, Document > run xpath > get Node level1 > run xpath > get Node Level2 and here make changes.
Is there any way to do this using pure Javascript? Jquery is not my option as I can include them as well as the xpaths are very complex.