P
Pathik
Hi All,
I have to get the values of "reading" and "value" elements of context
Person/Category/Group/ser.These values must be on condition
based,means I have to get the values of "reading" and "value" if
entity="abc" and value="1" , and entity= "def" and value="2" at the
Person/Category/Group/series/Key.
My xml source file is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<Person>
<Category>
<Group>
<series>
<Key>
<Main entity="abc" value="1"></Main>
<Main entity="def" value="2"></Main>
</Key>
</series>
<ser>
<reading>age</reading>
<value>100</value>
</ser>
<ser>
<reading>height</reading>
<value>6</value>
</ser>
<ser>
<reading>weight</reading>
<value>80</value>
</ser>
</Group>
</Category>
</Person>
I am new to xml. I don't know how to write xpath for such a thing.
Please take a look at and give me suggestions how i should i approach
this problem.
Thanks and Regards,
Pathik
I have to get the values of "reading" and "value" elements of context
Person/Category/Group/ser.These values must be on condition
based,means I have to get the values of "reading" and "value" if
entity="abc" and value="1" , and entity= "def" and value="2" at the
Person/Category/Group/series/Key.
My xml source file is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<Person>
<Category>
<Group>
<series>
<Key>
<Main entity="abc" value="1"></Main>
<Main entity="def" value="2"></Main>
</Key>
</series>
<ser>
<reading>age</reading>
<value>100</value>
</ser>
<ser>
<reading>height</reading>
<value>6</value>
</ser>
<ser>
<reading>weight</reading>
<value>80</value>
</ser>
</Group>
</Category>
</Person>
I am new to xml. I don't know how to write xpath for such a thing.
Please take a look at and give me suggestions how i should i approach
this problem.
Thanks and Regards,
Pathik