Re: [xsl] Re: XPATH Issue

Subject: Re: [xsl] Re: XPATH Issue
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Wed, 01 Dec 2010 11:47:51 +0100
Rajesh Jain wrote:
The XML Document snippet is

                 // Parse the XML as a W3C document.
                 DocumentBuilder builder =
                 Document document = builder.parse(new

I think if you want to use that API successfully with XPath and XSLT then you need to first ensure that you create a namespace aware DocumentBuilderFactory with i.e.
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = dbf.newDocumentBuilder();
as says the default is false.
Nevertheless then, as long as you use XPath 1.0, you need to bind and use a prefix for to select any nodes in a namespace.


	Martin Honnen

Current Thread