I want to parse an XML file (execute XPATH)
I use开发者_运维问答d SAX and not JDOM
How can i give item from query
thank you
There is a small example in the javax.xml.xpath package description:
XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
InputSource inputSource = new InputSource("widgets.xml");
NodeSet nodes =
    (NodeSet) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
If you already have a NodeList then I think you can use a different evaluate method instead.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论