Selecting text with XPath

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi All,
I have created a treeview control where one can navigate through XML files and then an XPath will be generated based on which node the selection stands (only for simple XPaths, of course). Next to the treeview control theres the raw XML data in a RichTextBox.
What I want to achieve is that if the user is moving around in the treeview the corresponding node or attribute would become highlighted as a feedback in the RichTextBox.
Obviously I need character positions to achieve this. Is there a way to obtain start/end positions of nodes inside the XML string?
Thanks for your help in advance.
Best Regards,
Daniel

View the full article
 
Back
Top