You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Scott Okupski <Sc...@WallStreetSystems.com> on 2000/12/05 21:10:08 UTC

XPath and Default Namespaces

How do you indicate the default namespace in an XPath expression?
Specifically, I'm using Xalan java 1.2 and want to process the following:
	Node node = XPathAPI.selectSingleNode(doc.getDocumentElement(),
"/Login/SessionId");

The source document is:
<Login xmlns="http://www.wallstreetsystems.com/Report"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:schemaLocation="http://www.wallstreetsystems.com/Report
http://derivsrv01/iros/schema/Login.xsd">
	<SessionId>25</SessionId>
</Login>

I see XPathAPI contains a method   public static NodeList
selectNodeList(Node contextNode, String str, Node namespaceNode) but I could
use an example of what to pass-in as the namespaceNode parameter.

Thanks, Scott