How about the XPath expression
 
customer[age >= 25 and age <= 30]
 
unless you don't want to include ages of 25 and 30 in which case this should do
 
customer[age > 25 and age < 30]
 
James
----- Original Message -----
Sent: Tuesday, August 14, 2001 6:52 AM
Subject: [dom4j-dev] Select info from the specific range

Dear friends,
Can anyone explain me how to solve the following problem?
 
I am getting one input as age -- 25-30.
My requirement is after seperating the age as 25 and 30,i should compare these values with the xml.
 
My xml looks like this,
 
<customer>
<name>Sasi</name>
<age>25</age>
</customer>
<customer>
<name>James</name>
<age>27</age>
</customer>
<customer>
<name>ram</name>
<age>32</age>
</customer>
<customer>
<name>guru</name>
<age>26</age>
</customer>

I should get the result of users who are in the age group of between 25 to 30.
 
How to approach this problem?
 
Advanced Tks,
 
Jowsaki

Reply via email to