You can do xpath pointing relative to a pointer's current "position". You can also use methods like selectParent() to navigate a pointer around within the data.

On Apr 19, 2007, at 4:28 PM, Not Zippy wrote:

Hi

I was perusing the calendar application and I noticed that to drill down into an event date the xpath was set progressively on a datapointer (first year then month then day) like
dp.setXPath('year2007')
..
dp.setXPath('month4')
...
dp.setXPath('day3')

And this navigated an xml document like
<year2007><month4><day3><event>...</event></day3></month4></year2007>

I always assumed that the xpath for a datapointer was required to be the full path to the dataset.. and I would have thought the syntax you would need to use was
dp.setXPath('eventdata:/year2007');
...
dp.setXPath('eventdata:/year2007/month4');..

(Although this would work to it is not near as flxible as the progressively setting the node names.) I assume this is intentional ? I haven't found any supporting documentation and any example with the data pointers always use the full path.
z

Reply via email to