我是 XSLT 的新手。我想使用 XSLT 为现有子节点添加父节点。我的 XML 文件如下所示
转换前
<Library>
.
.//There is more nodes here
.
<CD>
<Title> adgasdg ag</Title>
.
.//There is more nodes here
.
</CD>
.
.//There is more nodes here
.
<CLASS1>
<CD>
<Title> adgasdg ag</Title>
.
.//There is more nodes here
.
</CD>
</CLASS1>
</Library>
转换后
<Library>
<Catalog>
<CD>
<Title> adgasdg ag</Title>
</CD>
</Catalog>
<Class1>
<Catalog>
<CD>
<Title> adgasdg ag</Title>
</CD>
</Catalog>
</Class1>
</Library>