I need to implement a REST service that, given an HTML page, finds the occurrences of certain strings and provides results as XPointer (starting/ending DOM elements + start/end chars offset). My first option was to implement it in Java (e.g. with JSoup), however I find out this is not so straightforward. In javascript this would be done by using window.find() or similar implementations. My question is: is it possible to do it in Nodejs (+ domjs) ? I cannot find examples or specific doc online. Is there some JS guru that could help me with this?
thank you in advance,
Christian