java - Looking for JDOM2 XPath examples -


I am using JDOM2 for the first time and I am looking for some XPATH based instances.

Ex: My XML looks like this

  & lt; Root & gt; & Lt; Generic ID = "1" & gt; & Lt; Child id = "1" /> & Lt; Child id = "2" /> & Lt; Child id = "3" /> & Lt; / Parent & gt; & Lt; Generic ID = "2" & gt; & Lt; Child id = "1" /> & Lt; Child id = "2" /> & Lt; Child id = "3" /> & Lt; / Parent & gt; & Lt; Generic ID = "3" & gt; & Lt; Child id = "1" /> & Lt; Child id = "2" /> & Lt; Child id = "3" /> & Lt; / Parent & gt; & Lt; / Root & gt;   

My background. NET & amp; XPATH trussing system. XML is very easy with

I am working on a new Java application where I need to use XML. I am planning to use JDOM2 I use DOM parsing I do not want to and I do not.

I'm looking for some examples of how to use XPATH with JDOM2.

Ex How do I navigate to an element, we say that "/ root / parent [@ id = '2'] / child [@ id = '3']" < / Code>

Can you guys give me some examples? I searched but I did not find one for JDM2

OK, it proved and proved useful

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -