Re: What does a "//" mean in an xpath expressin?
- From: eric.goforth@xxxxxxxxx
- Date: 18 Aug 2006 07:43:59 -0700
eric.gofo...@xxxxxxxxx wrote:
In an xsl stylesheet, I have
<xsl:when test="string-length(//mystuff) > 0">
<xsl:attribute name="someattribute">blahblahblah</xsl:attribute>
</xsl:when>
In the xml that mystuff is several layers deep, does the // do a search
in the xpath?
<test>
<another_level>
<mystuff>testing123</mystuff>
</another_level>
</test>
Answering my own question, from the w3schools website:
Selecting Nodes
XPath uses path expressions to select nodes in an XML document. The
node is selected by following a path or steps. The most useful path
expressions are listed below:
Expression Description
nodename Selects all child nodes of the node
/ Selects from the root node
// Selects nodes in the document from the current node that match the
selection no matter where they are
.. Selects the current node
... Selects the parent of the current node
@ Selects attributes
I'd tried searching w3schools, Google Group, etc. But couldn't find
anything for the "//" string.
-Eric
.
- References:
- What does a "//" mean in an xpath expressin?
- From: eric . goforth
- What does a "//" mean in an xpath expressin?
- Prev by Date: What does a "//" mean in an xpath expressin?
- Next by Date: Re: What does a "//" mean in an xpath expressin?
- Previous by thread: What does a "//" mean in an xpath expressin?
- Next by thread: Re: What does a "//" mean in an xpath expressin?
- Index(es):
Relevant Pages
|