M
max
Hello!
There is a score of really good HTML/XML-parsers around. But I need a
DOM representation where every Node points to row/column positions of
the original text.
Example XML:
<html>
<body>
<p>Test</p>
</body>
</html>
After parsing Java should be able to render something like along the
line:
Element pElement = (Element) XmlUtil.getNode(htmlDoc, "html/body/p");
int srow = pElement.getStartRow(); //would render 3
int scol = pElement.getStartColumn(); //would render 5
int erow = pElement.getEndRow(); //would render 3
int ecol = pElement.getEndColumn(); //would render 16
Such a function seems to be integrated into Eclipe, but I have not
found the right API for it yet. Can anybody help or provide code
examples?
Best regards,
Max.
There is a score of really good HTML/XML-parsers around. But I need a
DOM representation where every Node points to row/column positions of
the original text.
Example XML:
<html>
<body>
<p>Test</p>
</body>
</html>
After parsing Java should be able to render something like along the
line:
Element pElement = (Element) XmlUtil.getNode(htmlDoc, "html/body/p");
int srow = pElement.getStartRow(); //would render 3
int scol = pElement.getStartColumn(); //would render 5
int erow = pElement.getEndRow(); //would render 3
int ecol = pElement.getEndColumn(); //would render 16
Such a function seems to be integrated into Eclipe, but I have not
found the right API for it yet. Can anybody help or provide code
examples?
Best regards,
Max.