首页 > 解决方案 > 如何进行 XSLT 转换?

问题描述

我有下面的xml文件结构,但我需要将其转换为节点“Type1”中“Shipper”和“Supplier”的结构

你能告诉我如何用 xslt 做到这一点吗?

      <Data>
        <Shipper>11111</Shipper>
        <Supplier>22222</Supplier>
        <Type1>
          <NumberOfConnections>2</NumberOfConnections>
          <Quantity>
            <Amount>2042</Amount>
            <Unit>AAAAA</Unit>
          </Quantity>
          <UserCategory>GGV</UserCategory>
        </Type1>
      </Data>

我希望有如下文件中的结构:

      <Data>
        <Type1>
        <Shipper>11111</Shipper>
        <Supplier>22222</Supplier>
          <NumberOfConnections>2</NumberOfConnections>
          <Quantity>
            <Amount>2042</Amount>
            <Unit>AAAAA</Unit>
          </Quantity>
          <UserCategory>GGV</UserCategory>
        </Type1>
       </Data>

谢谢!

标签: xmlxslt

解决方案


推荐阅读