Is There A Way To Extract Text Verbatim In Between Html Tags In Dom?
For example, for an HTML document:
Hello world
I know I can use getTextContent() to gSolution 1:
In Java, you can apply a XSLT transformation: https://docs.oracle.com/javase/tutorial/jaxp/xslt/writingDom.html
What you need is to retrieve the XML content of the element subtree. There are several questions in SO addressing this issue: How to I output org.w3c.dom.Element to string format in java?
Post a Comment for "Is There A Way To Extract Text Verbatim In Between Html Tags In Dom?"