Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何编写一些 XSL 来更改外部文档,使其结构从:
<Item id="1"> </Item>
至:
<Item> <Id>1</Id> </Item>
或者可以用PHP完成吗?我在 Drupal 中使用了一个名为 Migrate 的模块,这使我无法将我的 XML 转换为节点。
<xsl:template match="Item"> <Item> <Id><xsl:value-of select="@id" /></Id> </Item> </xsl:template>