我有两个XML:
第一个XML:
<FirstXML>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
</catalog>
</FirstXML>
Run Code Online (Sandbox Code Playgroud)
第二个XML:
<SecondXML>
<catalog>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
</SecondXML>
Run Code Online (Sandbox Code Playgroud)
我想使用XSLT转换我的第一个XML.第一个xml的cd节点应该替换为第二个xml的cd节点.
从XSLT转换得到的XML:
<FirstXML>
<catalog>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
</FirstXML>
Run Code Online (Sandbox Code Playgroud)
请帮我解决XSLT问题.我想我们需要将Second XML作为参数传递给XSLT,我试图这样做.我是XSLT的新手,所以可能无法正确编码.关于我们如何做到这一点的任何意见都会有所帮助.提前致谢.
xslt ×1