1

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.

James Z
  • 12,209
  • 10
  • 24
  • 44
  • Not really sure but take a look at the answer [here](https://stackoverflow.com/questions/52256799/how-to-use-document-getelementbyid-in-nodejs). It might be helpful – famoha Mar 31 '21 at 14:40

0 Answers0