Change the format of an xml file to match a new .XSD schema?

谁都会走 提交于 2019-12-23 02:01:51

问题


I have a code coverage xml file that I need to change to comply with a different .xsd schema to be interpreted by a program. What is the best way to do this? I've researched XSLT for this task, but I'm not sure if I'm going down the right path with that. I have no experience with xml, xslt, or xsd.


回答1:


To convert data from one XML format to another XML format, XSLT is usually the right choice. However, it is quite a complex language and may be frustrating if you don't know it well.

If you basically just need to rename a few nodes in the XML, you'll be fine with some simple XSLT.

If you have XSDs of both formats, you may want to look into a mapping tool like Altova MapForce (somewhat expensive, there certainly are cheaper options out there) that allow you to map between the schemas in a graphical way instead of writing XSLT directly.



来源:https://stackoverflow.com/questions/25045652/change-the-format-of-an-xml-file-to-match-a-new-xsd-schema

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!