java - Returning an element with a specific attribute JDOM -


i need on particular bit of code.

i have document object in jdom. have element object root. want specific element based on value of attribute. want avoid, filter through complete list of children, 1 element. there kind of way filter on value of document.

lets attribute value '123'

now want element 'id' value '123'

what best way this?

kind regards.

i use xpath that. following expression: //element[@attribute='value']


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -