What's the xpath to retrieve the value of
/root/main/data/data1
of the 1st section, where sibling
/root/main/info[@name='info1'] has value 'value_1a'?
In article <7e34c25e-3db7-4eaa-a4a1-94779ff87b2a@googlegroups.com>,
<frank67x@gmail.com> wrote:
What's the xpath to retrieve the value of
/root/main/data/data1
of the 1st section, where sibling
/root/main/info[@name='info1'] has value 'value_1a'?
You want the data/data1 of the root/main whose info[@name="info_1"]
is equal to "value_1a":
/root/main[info[@name="info_1"]="value_1a"]/data/data1
-- Richard
Two next questions:
1) Is it really "info_1" to use? or does it have to be 'info_1'?
(double quote or single quote)
2) Is it also supported to use a combination of criterions?
Something like e.g.:
/root/main[info[@name="info_1"]="value_1a"]&&[@name="info_2"]="value_2a"]/data/data1
Are logical operators supported? (&& above)
In article <54d935fd-e3d8-4efd-bd6b-c0e99212407d@googlegroups.com>,
<frank67x@gmail.com> wrote:
Two next questions:
1) Is it really "info_1" to use? or does it have to be 'info_1'?
(double quote or single quote)
You can use either kind of quote.
2) Is it also supported to use a combination of criterions?
Something like e.g.:
/root/main[info[@name="info_1"]="value_1a"]&&[@name="info_2"]="value_2a"]/data/data1
Are logical operators supported? (&& above)
That would be
/root/main[info[@name="info_1"]="value_1a" and info[@name="info_2"]="value_2a"]/data/data1
-- Richard
In article <54d935fd-e3d8-4efd-bd6b-c0e99212407d@googlegroups.com>,
<frank67x@gmail.com> wrote:
Two next questions:
1) Is it really "info_1" to use? or does it have to be 'info_1'?
(double quote or single quote)
You can use either kind of quote.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 415 |
Nodes: | 16 (2 / 14) |
Uptime: | 70:45:58 |
Calls: | 8,737 |
Calls today: | 10 |
Files: | 13,279 |
Messages: | 5,960,126 |
Posted today: | 4 |