Jdom parsing
hi iam new to java and jdom parsing.my imput is user passes the xml file and a string (string is not a tag in xml its a attribute value).i need to look for the string in the xml file and get all its child attributes .my xml looks like
<Trs>
<cetTra>
<xName>"jeff"</xName>
<child>pat</child>
<child>sush</childT>
<Delay>
<timeSec>60</timeSec>
<retry>1</retry>
</Delay>
</cetTra>
<cetTra>
<xName>"kumsa"</xName>
<child>sac</child>
<child>ed</child>
<Delay>
<timeSec>5</timeSec>
<retry>10</retry>
</Delay>
</cetTra>
</Trs>
my quesion is how to get only the the contents based on attribute .Input string will be jeff i need to get the contents only for jeff .my code looks like
List passedStringList = root.getChildren("Cetra");
Iterator i = passedStringList.iterator();
while (i.hasNext()){
Element serv= (Element) i.next();
out.print("\t" + serv.getChild("xName")
.getText());
o/p gets both jeff and kumsa
Thanks for the help

