I am really new to node. I was working on REST calls. I get a request from Postman(using it to check REST api calls) with a URL. I need to make a few word level changes on the contents of that URL
e.g if the url is received is https://en.wikipedia.org/wiki/Main_Page I need to fetch its content(currently doing it with the get request on page) and change all small 'the' to "THE" (captialised). I need to make many-many such word level changes
For this I created a DOM model of the HTML page using htmlparser2.DomHandler() in node htmlparser2 (https://www.npmjs.com/package/htmlparser2). And i was able to traverse the DOM and change the word.
Now i have a new DOM with changed content and i need to convert it back to HTML and send the new html as response back to postman(client). So that i can display the changed content on my own web-page
So my question is how to create HTML back from DOM Tree created in html-parser2 in node.js
PS: I am able to send the original html without making a DOM and display original content DOM : Document Object Model