namshi5
asked on
How to convert xml from one format to another?
I am a Tester and our company bought a new Test management tool and we are trying to migrate the testcase from the old tool to the new one.
However the output xml of the old tool is not compatible with the new one and I am looking for a solution to convert the old xml to the new format.
I have attached the xml's from both the tools and would highly appreciate if anyone could help me out in this task.
old.xml
new.xml
However the output xml of the old tool is not compatible with the new one and I am looking for a solution to convert the old xml to the new format.
I have attached the xml's from both the tools and would highly appreciate if anyone could help me out in this task.
old.xml
new.xml
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a Lot !! I will try it out on the tool XMLwriter and will let you know how it went.
Cheers
Nams
Cheers
Nams
ASKER
Hi,
I am still struggling with the conversion (I am very bad at this)...Could you give me a step by step guide on how I could do this. I am using a tool called Stylus Studio.
Also there are 100's of xml's to be reformatted, how can I do this in a Batch mode?
Regards
Nams
I am still struggling with the conversion (I am very bad at this)...Could you give me a step by step guide on how I could do this. I am using a tool called Stylus Studio.
Also there are 100's of xml's to be reformatted, how can I do this in a Batch mode?
Regards
Nams
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
I tried it and got the below exception.
at: file:///c:/Users/NAMSHI%7E 1/Desktop/ TESTTR%7E1 /STYLES%7E 2.XSL 1
java.lang.RuntimeException : Error: on line 1 column 2 of file:///c:/Users/NAMSHI%7E 1/Desktop/ TESTTR%7E1 /STYLES%7E 2.XSL:
SXXP0003: Error reported by XML parser: The markup in the document preceding the root element must be well-formed.
at com.exln.stylus.CSaxon8Dri ver.doProc essing(CSa xon8Driver .java:269)
at com.exln.stylus.CProcessor Driver.pro cess(CProc essorDrive r.java:104 )
stylesheet_new.xsl (1, 2)
Error: on line 1 column 2 of file:///c:/Users/NAMSHI%7E 1/Desktop/ TESTTR%7E1 /STYLES%7E 2.XSL: SXXP0003: Error reported by XML parser: The markup in the document preceding the root element must be well-formed.
Its obviously a parsing error, but I am not able to correct it.
Do you have a gmail / skype ID so you could help me out.
Mine is namshi5@gmail.com and skype: namshi5
I tried it and got the below exception.
at: file:///c:/Users/NAMSHI%7E
java.lang.RuntimeException
SXXP0003: Error reported by XML parser: The markup in the document preceding the root element must be well-formed.
at com.exln.stylus.CSaxon8Dri
at com.exln.stylus.CProcessor
stylesheet_new.xsl (1, 2)
Error: on line 1 column 2 of file:///c:/Users/NAMSHI%7E
Its obviously a parsing error, but I am not able to correct it.
Do you have a gmail / skype ID so you could help me out.
Mine is namshi5@gmail.com and skype: namshi5
I don't have access to those at work. Please send me your XML and XSLT files: kmartin7@gmail.com
Hi namshi5,
I got your email and tried your XML & XSLT, and didn't find any problems running it. As a result, it is hard to day exactly what the problem is.
Try changing the parser (edit scenario properties > processor tab) and see what error you get.
kmartin7
I got your email and tried your XML & XSLT, and didn't find any problems running it. As a result, it is hard to day exactly what the problem is.
Try changing the parser (edit scenario properties > processor tab) and see what error you get.
kmartin7
ASKER
Hi Martin,
Finally Managed to convert the files...Cant thank you enough...
Regards
Nams
Finally Managed to convert the files...Cant thank you enough...
Regards
Nams
You're welcome. If you are satisfied, please grade and close this question.
Regards.
Regards.
ASKER
martin provided a thorough and informative answer to my question.
<xsl:output indent="yes" method="xml" encoding="utf-8" doctype-system="TestTrackD