【发布时间】:2013-02-25 16:38:36
【问题描述】:
有没有可能得到这样的转变:
源 XML:
<Item>
<stockcode>XXX1</stockcode>
<vehicle>Bentley</vehicle>
<model>Continental GT (2006-)</model>
<model>Continental Flying Spur (2006-)</model>
<width>9</width>
<wheel_size>20</wheel_size>
<offset>40</offset>
<bolt_pattermn>5x112</bolt_pattermn>
<brand>AEZ</brand>
<Velg_ID>AEZ Myta</Velg_ID>
<kit1>DK-ZJAE x1</kit1>
</Item>
目标 XML:
<Item>
<stockcode>XXX1</stockcode>
<vehicle>Bentley</vehicle>
<model>Continental GT (2006-)</model>
<width>9</width>
<wheel_size>20</wheel_size>
<offset>40</offset>
<bolt_pattermn>5x112</bolt_pattermn>
<brand>AEZ</brand>
<Velg_ID>AEZ Myta</Velg_ID>
<kit1>DK-ZJAE x1</kit1>
<qty_available>8.00000000</qty_available>
<price>174.00</price>
<picture>41010</picture>
<pkpcena>195.4999</pkpcena>
</Item>
<Item>
<stockcode>XXX1</stockcode>
<vehicle>Bentley</vehicle>
<model>Continental Flying Spur (2006-)</model>
</Item>
在源 XML 中有 1 个节点的 X 元素,必须将其划分为 X 节点的 1 个元素。目标 XML 可以包含源中的所有元素,也可以仅包含元素 <vehicle> 和 <model>!
如果是 - 有人可以给出提示吗? ;-)
谢谢!
【问题讨论】: