I have extracted an XML file (using Export Test Suite functionality) in TestLink. The issue I am facing is that most of the summary and steps tags have been given as HTML code, embedded in CDATA.
As such this is not an issue, but I need to convert this file into an EXCEL sheet for importing into Visual Studio Test Manager. When I try to convert it, it does not come in the proper fashion and also, the data still has those HTML tags enclosing it, making it difficult to read.
My question is: Is there any simple way to remove those CDATA and HTML tags from the XML file? I tried converting it to Canonical form, but that only removes the CDATA string and not the actual HTML tags from the files. Thus, making it more difficult for me to export them to EXCEL.
SAMPLE INPUT:
<expectedresults><![CDATA[
1. <span style="font-size: 10pt; color: black; font-family: "Times New Roman","serif";"><font face="Arial">Sample Text Which I want to Keep</font></span>
2. Sample Text Which I want to Keep
3. <font face="Arial"><span style="font-size: 10pt; color: black; font-family: "Times New Roman","serif";">Sample Text Which I want to Keep</span>
4. <span style="font-size: 10pt; color: black; font-family: "Times New Roman","serif";">Sample Text Which I want to Keep</span>
]]>
</expectedresults>
SAMPLE OUTPUT:
<expectedresults>
1. Sample Text Which I want to Keep
2. Sample Text Which I want to Keep
3. Sample Text Which I want to Keep
4. Sample Text Which I want to Keep
</expectedresults>
Assuming the format is exactly as you have mentioned. Perhaps you could write a macro to create another excel using the current one with all HTML tags in it.
I think there could be a multi step process to extract what you need.
HTH.