开发者

Getting the value of an attribute in XML

开发者 https://www.devze.com 2023-02-21 00:42 出处:网络
How would one get the value of attribute1 (blah) in the following xml using xslt: <name attribute1=\"blah\" attr开发者_开发技巧ibute2=\"blahblah\">

How would one get the value of attribute1 (blah) in the following xml using xslt:

<name attribute1="blah" attr开发者_开发技巧ibute2="blahblah">
</name>


This is more of an xpath question, but like this, assuming the context is the parent element:

<xsl:value-of select="name/@attribute1" />
0

精彩评论

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