<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:lucida console, sans-serif;font-size:10pt"><div>I'm interested in building a simple webapp to that will evaluate xpath expressions and return the results in HTML. The tricky part is that I'd like to highlight the result nodes in context of the source document. For example, if I have an XML document that looks like<br><br><?xml version="1.0" encoding="UTF-8"?><br><a><br> <b><br> <c><br> <d/><br> </c><br> </b><br></a><br><br>and I execute the xpath expression "//d/ancestor::*", I would like to display the results in HTML as follows:<br><br><strong>&lt; a &gt; </strong><br> <strong>&lt; b &gt;
</strong><br> <strong>&lt; c &gt; </strong><br> &lt; d &gt;<br> <strong>&lt; /c &gt; </strong><br> <strong>&lt; /b &gt; </strong><br><strong>&lt; /a &gt; </strong><br><br>I started writing my own JDOM XMLOutputter to highlight the result nodes but I'd rather avoid this effort, especially if someone else has already solved this problem. I'd appreciate any insight on this. Thanks.<br><br>-Andrew<br><br> <br><br></div></div></body></html>