Convert XML to Json format - jScript
Hey guys, I curretly have an XML file that I use to map some test data so I could create another XML file and send it somwhere. Current XML format is: <Mappings> <Test id="Test_1000_test"> <TestIdMapping>Test_1001_test1</TestIdMapping> <TestIdMapping>Test_1002_test2</TestIdMapping> </Test> <Test id="Test_2000_test"> <TestIdMapping>Test_2001_test1</TestIdMapping> <TestIdMapping>Test_2002_test2</TestIdMapping> <TestIdMapping>Test_2003_test3</TestIdMapping> </Test> <Mappings> Basically I am mapping 1001, 1002 to 1000....... I would like to switch this file to JSON and have it in TestComplete instead of reading it from the outside (external XML). What's is the best way to it ? I have an idea in head but I would like your opinion. Please note that file could have up to few hundreds tests.1.9KViews0likes11Commentsgetting XML DOM tagName fails
MicrosoftXML DOM Propertiespage shows "tagName" as a property. But when I try to use it with # Python Log.Message("Node tag: " + mynode.tagName) I get "AttributeError: The object does not support this property or method" I can use "nodeName", "nodeValue", "xml", "text", or various other properties with no problem. Indeed, the "xml" property shows the tag name and the value. But how do I get just the tagName? Why doesn't it work, or why is it not supported?Solved1.2KViews0likes3Commentshow to read a .xsl format stylesheet using TestComplete
Hi, I want to read a xml, typically a stylesheet in .xsl format. I want to traverse to a particular node which i have marked in bold. Can any of you help in the same. <xsl:template match="/"> <xsl:for-each select="c:Akanksha"> <xsl:text>MSH|^~\&|Sanket|</xsl:text><xsl:value-of select="dateConversion:NowDate()" /><xsl:value-of select="dateConversion:NowTime()"/><xsl:value-of select="dateConversion:Offset()"/><xsl:text>||Elena||</xsl:text> <xsl:text>SFT||||||</xsl:text> <xsl:text>UAC||</xsl:text> I want to read the Text in the Red Colour,from the node in blue colour.764Views0likes1Comment