Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Java DOM: Sample XPath Query (See related posts)

    try
    {
      XPath xpath = XPathFactory.newInstance().newXPath();
      Element e = (Element) xpath.evaluate("/Archive/Section/Description", parentNode,
          XPathConstants.NODE);
      printXmlNode(e);
    }
    catch (XPathExpressionException e)
    {
      e.printStackTrace();
    }

Comments on this post

xaero posts on Oct 30, 2007 at 03:03
anyone has any idea about how to create XML from a DTD file using JAVA

You need to create an account or log in to post comments to this site.


Click here to browse all 4857 code snippets

Related Posts