我想這個XML轉換:轉換屬性值成元素
<tokens>
<token cle="a">
<token cle="b">nomX</token>
<token cle="c">prenomX</token>
<token cle="d">villeX</token>
</token>
<token cle="a">
<token cle="b">nomY</token>
<token cle="c">prenomY</token>
<token cle="d">villeY</token>
</token>
<token cle="e">nomZ</token>
</tokens>
這個XML:
<tokens>
<a>
<b>nomX</b>
<c>prenomX</c>
<d>villeX</d>
</a>
<a>
<b>nomY</b>
<c>prenomY</c>
<d>villeY</d>
</a>
<e>nomZ</e>
</tokens>
這樣的屬性值轉換成元素,但我需要保持整個結構和deph。
我試過使用XSL,但是我還沒有成功。 如果有人有一個想法,它將不勝感激。
Thx。
沒有這個工作根本沒有:首先你失去了令牌的內容,你必須爲元素名稱{@ arround @cle}。 – lweller 2011-01-19 10:25:02
您好thx快速響應,它真的幫我找到答案這裏是我使用: \t \t \t \t \t的 \t \t XSL:元素> \t XSL:模板> –
TbtV2
2011-01-19 10:27:31