Wednesday, 10 December 2014

Eclipse IDE - how to navigate to an xml file at line number



In Eclipse, how do I navigate to an xml file at a specific line number?


I have a search utility which searches for occurrences of a pattern in thousands of xml files in a folder. The utility may generate a result like this:



<results pattern="abcXXDFDdf">
<match path="./xml/subfolder1/fileaa.xml" line="120"/>
<match path="./xml/subfolder2/filexx.xml" line="47"/>
<match path="./xml/subfolder3/fileyy.xml" line="99"/>
<match path="./xml/subfolder4/filezz.xml" line="3"/>
</results>


or



<results pattern="abcXXDFDdf">
<match path="./xml/subfolder1/fileaa.xml:120"/>
<match path="./xml/subfolder2/filexx.xml:47"/>
<match path="./xml/subfolder3/fileyy.xml:99"/>
<match path="./xml/subfolder4/filezz.xml:3"/>
</results>


I like to navigate to a match with simplest keystroke or a mouse event, or via Eclipse-based xml plugin.


Note: CtrlH search is not practical for my purpose. I had tried that route.


TIA


No comments:

Post a Comment