Using XPath question.Plase guide.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luthriaajay
    New Member
    • Apr 2007
    • 56

    Using XPath question.Plase guide.

    I intend using XPATH to browsw thru an XML document in Java.
    This XML document is of type Document.

    First Question:

    How do I use the Document Builder to open an XML document?

    Code:
    Document xmlMessage;
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
        domFactory.setNamespaceAware(true); // never forget this!
        DocumentBuilder builder = domFactory.newDocumentBuilder();
        Document doc = builder.parse("books.xml"); //???
    
        I need to pass xmlMessage to the parse method() ?
        how can I pass document xmlMessage?
  • luthriaajay
    New Member
    • Apr 2007
    • 56

    #2
    The above has been done

    Comment

    • dorinbogdan
      Recognized Expert Contributor
      • Feb 2007
      • 839

      #3
      Thanks for reply.

      Dorin.

      Comment

      Working...