0
試圖將具有多個元素的xml文件拆分爲具有不同元素的單獨xml。使用xslt分割具有多個值的xml文件
輸入文件:
<Person>
<firstname>ABC</firstname>
<lastname>ABC</lastname>
<address>address1</address>
<address>address2</address>
<city>city</city>
<state>state</state>
<currency>currency1</currency>
<currency>currency2</currency>
</Person>
Need to split above file into two files as
Output file-1
<Person>
<firstname>ABC</firstname>
<lastname>ABC</lastname>
<address>address1</address>
<city>city</city>
<state>state</state>
<currency>currency1</currency>
</Person>
輸出文件-2
<Person>
<firstname>ABC</firstname>
<lastname>ABC</lastname>
<address>address2</address>
<city>city</city>
<state>state</state>
<currency>currency2</currency>
</Person>
是否總會有兩個地址和貨幣元素?還是各種各樣,元素數量未知? –
將會有超過2個元素,但所有元素都將被知道。 – Rajeev