Gruntjs 使用grunt合并两个xml
如何使用grunt合并两个xml文件 我需要合并两个xml文件 A.xmlGruntjs 使用grunt合并两个xml,gruntjs,grunt-usemin,grunt-contrib-concat,grunt-jsbeautifier,Gruntjs,Grunt Usemin,Grunt Contrib Concat,Grunt Jsbeautifier,如何使用grunt合并两个xml文件 我需要合并两个xml文件 A.xml <?xml version="1.0"?> <module id="one"> <a>numberone</a> </module> <?xml version="1.0"?> <module id="two"> <a>numbertwo</a> </module> <?xml version
<?xml version="1.0"?>
<module id="one">
<a>numberone</a>
</module>
<?xml version="1.0"?>
<module id="two">
<a>numbertwo</a>
</module>
<?xml version="1.0"?>
<module id="one">
<a>numberone</a>
</module>
<module id="two">
<a>numbertwo</a>
</module>
号码
B.xml
<?xml version="1.0"?>
<module id="one">
<a>numberone</a>
</module>
<?xml version="1.0"?>
<module id="two">
<a>numbertwo</a>
</module>
<?xml version="1.0"?>
<module id="one">
<a>numberone</a>
</module>
<module id="two">
<a>numbertwo</a>
</module>
第二
合并后,xml将如下所示
c.xml
<?xml version="1.0"?>
<module id="one">
<a>numberone</a>
</module>
<?xml version="1.0"?>
<module id="two">
<a>numbertwo</a>
</module>
<?xml version="1.0"?>
<module id="one">
<a>numberone</a>
</module>
<module id="two">
<a>numbertwo</a>
</module>
号码
第二
由于grunt中没有xml合并插件,因此必须手动执行。concat xmls,删除xml节点并写入可能(延迟)的答案: