在从excel 2010导出文件以与mantis一起使用之前,向xml标记添加属性

时间:2013-02-06 13:23:51

标签: xml excel xsd mantis

我正在使用螳螂,我需要将我在excel电子表格上编写的错误导入到mantis中,所以我创建了一个模式(file.xsd)并将我的数据映射到该模式,最后我将我的错误导出到xml文件中与mantis兼容。问题是我需要在生成的xml文件中为某些标签添加属性(id),有没有办法在文件准备期间执行该步骤(例如在excel中添加一列),我的意思是在导出文件之前? 这是导出的数据和我想要的数据的示例:

导出的数据:

<?xml version="1.0" encoding="UTF-8"?>
<mantis version="1.2.12" urlbase="http:xxx/mantis/" issuelink="#"  notelink="~" format="1">
<issue>
    <id>29</id>

    <project>Project 1</project>

    <reporter>Engy</reporter>

    <priority>urgent</priority>

    <severity>block</severity>

   <reproducibility>always</reproducibility>

    <status>new</status>

    <resolution>open</resolution>

    <projectio>none</projection>
   </issue>
 </mantis>

我需要将id属性添加到<project><priority>以及<severity>

 <project id="1">project 1</project>
 .
 .

0 个答案:

没有答案