2

In .net I would use LINQ to XML to query an xml document with linq. Is there anything similar in Java EE?

I have a large xml file with state,city,town names that i need to use for cascading dropdowns. So I am looking for the best way to retrieve this data.

Thanks

John
  • 1,852
  • 4
  • 26
  • 49

1 Answers1

4

You can use XPath to select the relevant data using javax.xml.xpath

It is a more standard way and you'll be able to use the same XPath expression in many programming languages (unlike LINQ)

You can see a nice example for XPath here as well.

Aviram Segal
  • 10,962
  • 3
  • 39
  • 52