use XPath to select one of the node?

Can I use xpath to draw <param-value>/mnt/VISL/stats/stats/clarent2</param-value>

only?

I have tried to use ApplyXPath sample, but

I don't know what xpath value I should use?

I tried /doc/servlet/init-param/param-value

but it certainly draw other tag with the same name

Pls help!!!

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app

PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>

<servlet-name>

gen_daily

</servlet-name>

<servlet-class>

gen_daily

</servlet-class>

<init-param>

<param-name>clarent_init_dir</param-name>

<param-value>/mnt/VISL/stats/stats/clarent2</param-value>

</init-param>

<init-param>

<param-name>linefeed_mode</param-name>

<param-value>2</param-value>

</init-param>

</servlet>

<servlet>

<servlet-name>

RequestParamExample

</servlet-name>

<servlet-class>

RequestParamExample

</servlet-class>

</servlet>

<servlet>

<servlet-name>

RequestParamExample2

</servlet-name>

<servlet-class>

RequestParamExample2

</servlet-class>

</servlet>

<!-- Define example application events listeners -->

<!-- Define servlets that are included in the example application -->

<welcome-file-list>

<welcome-file>index.html</welcome-file>

<welcome-file>index.htm</welcome-file>

<welcome-file>index.jsp</welcome-file>

</welcome-file-list>

<taglib>

<taglib-uri>

http://java.apache.org/tomcat/examples-taglib

</taglib-uri>

<taglib-location>

/WEB-INF/jsp/example-taglib.tld

</taglib-location>

</taglib>

<resource-ref>

<res-ref-name>mail/session</res-ref-name>

<res-type>javax.mail.Session</res-type>

<res-auth>Container</res-auth>

</resource-ref>

<security-constraint>

<display-name>Example Security Constraint</display-name>

<web-resource-collection>

<web-resource-name>Protected Area</web-resource-name>

<!-- Define the context-relative URL(s) to be protected -->

<url-pattern>/jsp/security/protected/*</url-pattern>

<!-- If you list http methods, only those methods are protected -->

<http-method>DELETE</http-method>

<http-method>GET</http-method>

<http-method>POST</http-method>

<http-method>PUT</http-method>

</web-resource-collection>

<auth-constraint>

<!-- Anyone with one of the listed roles may access this area -->

<role-name>tomcat</role-name>

<role-name>role1</role-name>

</auth-constraint>

</security-constraint>

</web-app>

--

[3384 byte] By [calvinchoi] at [2007-9-26 3:13:38]
# 1
You have to start at the root and go down the XML tree.Try:/web-app/servlet/init-param/param-valueAre you trying to use this in xsl?Kind regards,Hans.
interfr4stic at 2007-6-29 11:23:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...