开发者

How do i check if a node is a child of another node?

I want to get all "g开发者_开发问答enerateId" values of the text nodes which are a child of a specific node whose attribute "id" value is known. I can i test for this condition using XSL?


Use an XPath 2.0 expression like this:

//specificNode[@id=$knownValue]/text()/generate-id(.)

You may also use keys (<xsl:key> and the key() function) for more efficient selection of all specificNode-s that have an id attribute with a knownValue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜