I have a xml file like the following one:
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<admins>
<url name="Writer Admin">http://www.mywebsite.com/admins?cat=writer</url>
<url name="Editor Admin">http://www.mywebsite.com/admins?cat=editor</url>
</admins>
<users>
<url name="Critic User">http://www.mywebsite.com/users?cat=critic</url>
<url name="Reviewer User">http://www.mywebsite.com/users?cat=reviewer</url>
<url name="Reader User">http://www.mywebsite.com/users?cat=reader</url>
</users>
</config>
How can I select the "url" elements by the value of their "name" attributes using JDOM library in java? Is there any straightforward way or I have to select all the child elements and check for the desired element using a "for" loop? Is there any approach like the Linq in .Net?