[xml] xpath question: parsing or create elements with an expression



Hi,

I have to navigate in a given DOM tree with a xpath expression.
Searching for data is easy,  but I have also to save data.

The xpath expression look like:
"/settings/section[ name='configuration']/item[ type='wxDateTime'][ name='datawritten']"
(I know, xpath can pointed to several items. This isn't the problem in
my case.)

If a node doesn't exists, it should be create. This contain the
necessity to create all elements of the hierarchy including their
attributes.

How could I manage this? Is there a way to do automatically this with an
existing function? If not, then as first I have to parse the xpath
expression. Is there an existing function which can detach the
hierarchic elements and the attributes?

Thanks.

Torsten







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]