| | |
XPath for web.xml
Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 1
Reputation:
Solved Threads: 0
Hello,
Is it possible to write xpath expressions that will query a web server's web.xml like this one :
I would want to know if a particular web.xml has certain set of tags present or not. Like <servlet> and </servlet>
And if yes to get their count.
How can this be achieved using XPath expressions?
Tahnks.
Is it possible to write xpath expressions that will query a web server's web.xml like this one :
XML, XSLT and XPATH Syntax (Toggle Plain Text)
<web-app> <display-name>My Application</display-name> <!-- Standard Action Servlet Configuration (with debugging) --> <servlet> <servlet-name>TestServlet</servlet-name> <servlet-class>com.mycompany.MyServlet</servlet-class> </servlet> <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>TestServlet</servlet-name> <url-pattern>/first</url-pattern> </servlet-mapping> </web-app>
I would want to know if a particular web.xml has certain set of tags present or not. Like <servlet> and </servlet>
And if yes to get their count.
How can this be achieved using XPath expressions?
Tahnks.
•
•
Join Date: Oct 2008
Posts: 100
Reputation:
Solved Threads: 5
XML, XSLT and XPATH Syntax (Toggle Plain Text)
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:param name="find">servlet</xsl:param> <xsl:output method="text" encoding="utf-8"/> <xsl:template match="node()"> <xsl:value-of select="count(//*[local-name()=$find])"/> <xsl:text>
</xsl:text> </xsl:template> </xsl:stylesheet>
![]() |
Similar Threads
- Looking for projects (Post your Resume)
- Last q on this project I promise lol (ASP.NET)
- PHP/MySQL Programmer Position (Web Development Job Offers)
- PHP developer (Post your Resume)
- Java XML Developer London WC1 (Web Development Job Offers)
- Boston Full-Time Job: Sr. Web Developer / Application Engineer (Web Development Job Offers)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: Split Table in XSLT
- Next Thread: XSLT: Need to concatenate strings in loop and hold them for later use
| Thread Tools | Search this Thread |
api blogger blogging code delete development dynamiccreationofnvariablesinxslt error firstthreecharacterofastringrequired flipbook gdata google html include java link linspire linux microsoft news node openoffice overwrite precedence programming rss standards swf template transform variable w3c web xml xmlnotloading xmlonserver xsl xslt





