| Author |
XQueryUtil
|
kamiya sei
Greenhorn
Joined: Dec 12, 2012
Posts: 25
|
|
HI all !
I have a file called student.xml
<center name="Softech Aptech">
- <class name="B59B">
- <student>
<name>Tom</name>
<mark>9.5</mark>
<grade>A</grade>
</student>
</class>
- <class name="B560">
- <student>
<name>Mary</name>
<mark>9.5</mark>
<grade>A</grade>
</student>
</class>
</center>
in this file , I want to get 'name' in element student Who have attribute '<class name=B59B>' .So, I use XQueryUtil to call it
Nodes students = XQueryUtil.xquery(doc, "//class/student/name[class[@name='B59B']]");
but it display <name><mark>and <grade> >
can you tell me how to just get '<name>'?
thanks.
|
 |
g tsuji
Ranch Hand
Joined: Jan 18, 2011
Posts: 357
|
|
Nodes students = XQueryUtil.xquery(doc, "//class/student/name[class[@name='B59B']]");
but it display <name><mark>and <grade> >
That is unlikely the outcomes of it, so not even sure why you said so.
how to just get '<name>'?
|
 |
kamiya sei
Greenhorn
Joined: Dec 12, 2012
Posts: 25
|
|
g tsuji wrote:
Nodes students = XQueryUtil.xquery(doc, "//class/student/name[class[@name='B59B']]");
but it display <name><mark>and <grade> >
That is unlikely the outcomes of it, so not even sure why you said so.
how to just get '<name>'?
thank you.
that is what I need
|
 |
 |
|
|
subject: XQueryUtil
|
|
|