Thanks dave, 
        when i read that FAQ before, the headline 'Retrieving nodes in the
default namespace' didn't catch my attention for some reason. I guess i was
looking for something with XPath in the title. 

-----Original Message-----
From: David N Bertoni/Cambridge/IBM [mailto:[EMAIL PROTECTED]
Sent: Friday, July 26, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: Re: Default Namespace & XPath






This is a FAQ:

   http://xml.apache.org/xalan-j/faq.html#faq-11

Dave



 

                      "Sullivan, Mark E" <Mark.

                      [EMAIL PROTECTED]                      To:
"[EMAIL PROTECTED] Apache. Org (E-mail)" <[EMAIL PROTECTED]>

                      international.com>                 cc:

                                                         Subject: Default
Namespace & XPath                                                    
                      07/26/2002 01:28 PM

 

 




When i declare a default namespace for my xml document, my XPath
expressions
no longer work. For the following xml document, which i cut off for the
sake
of brevity, the expression "/invoice/header/dealer/LocationCode/text()"
worked fine. But as soon as i declared the default namespace, as seen
below,
it no longer returns any nodes. I'm using the code:

             Node blah =
XPathAPI.selectSingleNode(e,"/invoice/header/dealer/LocationCode/text()");
             System.out.println(blah.getNodeValue());

Any suggestions/solutions would be appreciated,

Mark

...

Reply via email to