小编mah*_*861的帖子

使用xslt将XML转换为XML

正如我之前所说,我已经开始学习XSLT了

当我正在努力时,我得到了错误的XML格式

输入

<?xml version="1.0" encoding="ISO-8859-1"?>
<testingconfig note-ref="no">
<access-panel>113AL</access-panel>
<access-panel>119AL</access-panel>
</testingcongif>
Run Code Online (Sandbox Code Playgroud)

产量

<?xml version="1.0" encoding="ISO-8859-1"?>
<testingconfig>
<panel><panelid>113AL</panelid></panel> 
<panel><panelid>119AL</panelid></panel> 
</testingconfig>
Run Code Online (Sandbox Code Playgroud)

我的XSL

<?xml version="1.0" encoding="ISO-8859-1"?>
<testingconfig>
    <xsl:for-each select="testingconfig">
    <panel>
        <panelid>
            <xsl:value-of select="*"/>
        </panelid>
    </panel>
</xsl:for-each>
</testingconfig>
Run Code Online (Sandbox Code Playgroud)

出于这个原因

<testingconfig>
<panel>
    <panelid>
        113AL 119AL
    </panelid>
</panel>
</testingconfig>
Run Code Online (Sandbox Code Playgroud)

任何人都可以在这里帮助我,我在做错误,请帮助我在XSLT 2.0中如何做到这一点

请帮助我

谢谢和问候M.

xml xslt

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

xml ×1

xslt ×1