以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  how to convert an xml to another one which will only extract the second child element?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=123602)


--  作者:joytwo0708
--  发布时间:2/25/2012 1:39:00 AM

--  how to convert an xml to another one which will only extract the second child element?

how to convert an xml to another one which will only extract the second child element?
for example
<root xmlns="testns">
<a>
   <a1>1111</a1>
   <a2>2222</a2>
  </a>
  <b>
   <b1>1111</b1>
   <b2>2222</b2>
  </b>
<c>
   <c1>1111</c1>
   <c2>2222</c2>
  </c>
</root>

which will be converted to
<b xmlns="testns">
   <b1>1111</b1>
   <b2>2222</b2>
  </b>


--  作者:Qr
--  发布时间:3/24/2012 11:19:00 AM

--  
<xsl:copy>或<xsl:copy-of>
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms