Home › Forums › General XMetaL Discussion › How to traverse PIs? › Reply To: How to traverse PIs?
Reply to: How to traverse PIs?June 2, 2011 at 4:51 am
Use these APIs for working with Change Tracking:
I think that's all of them. See Programmer's Guide for details. These were really designed to allow you to provide custom UI for the end user if the two interfaces we provide (the toolbar and the dialog) don't do exactly what you need them to.
I don't think the getNodesByXPath() API can be used for Change Tracking because these PIs are a special part of the document's node tree and may not show up with that API.
If you need to make programmatic changes to these that could get very tricky. You could try walking the document using Range.GotoNext() and at each location check to see if you are in a PI node (nodetype = 7) and if so whether it has the correct target value.
Perhaps knowing what you need to do with these nodes will help me give a better answer.