Using XPATH returns NULL.Please see and advise

Hi,

Why is my xpath giving null for the the flwg :

<Configuration>

<Listener.Whiteboard>

<AQListener>

<Product>A</Product>

<Message.Class>XMLMessage</Message.Class>

<Database>

<URL></URL>

</Database>

</AQListener>

</Listener.Whiteboard>

</Configuration>

Java Code

1) wbCL.initialise(m_config.getNode("/Configuration/Listener.Whiteboard"));

2)privatevoid initialise(Node confignode){

XPath xpath = XPathFactory.newInstance().newXPath();

Node listenerconfignode = (Node)xpath.evaluate("AQListener",confignode, XPathConstants.NODE);

}

System.out.println(listenerconfignode)// shows NULL

Any idea why this is showing Null?

Am I missing anything?

,

[1069 byte] By [bhuru_luthriaa] at [2007-11-27 4:32:42]
# 1
I think what you want is "//AQListener" to select all AQListener in your document. Alternatively, you can write "/Configuraton/Listener.Whiteboard/AQListener".
spericasa at 2007-7-12 9:42:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...