[英]Select value of xml document with namespace
I have the following XML snippet我有以下 XML 片段
<aaa>
<bbb xmlns="http://net.some.address.com">
<ccc>123321</ccc>
</bbb>
</aaa>
And i want to select the value of <ccc>
with XSL template, but not able to get it by using我想 select
<ccc>
的值与 XSL 模板,但无法通过使用
<xsl:value-of select="/aaa/bbb/ccc"/>
Any ideas how to get the value without changing the input?任何想法如何在不改变输入的情况下获得价值?
Declare the namespace and use it.声明命名空间并使用它。
<xsl:value-of xmlns:a="http://net.some.address.com" select="/aaa/a:bbb/a:ccc"/>
a
.a
.<xsl:stylesheet>
level, but as you can see, that's just a convention.<xsl:stylesheet>
级别声明,但如您所见,这只是一个约定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.