I tried with multiple options but my script seems to always return -1.. Can you please help me
My XML:
<?xml version="1.0" encoding="UTF-8"?>
<testResults>
<buildNumber number=1290_100/>
<serverName>tc1</serverName>
<resultsURL>http://qa-xppro-test/tc1/smokeTest_2013_02_01.html</resultsURL>
<testArea name="WebServiceAPITest">
<param name="total">35</param>
<param name="pass">35</param>
<param name="errors">0</param>
<param name="timeTaken">19.36</param>
</testArea>
<testArea name="restAPI">
<param name="total">35</param>
<param name="pass">35</param>
<param name="errors">0</param>
<param name="timeTaken">19.36</param>
</testArea>
</testResults>
My script:
#include <_XMLDomWrapper.au3>
#include <File.au3>
Global $sFile = "dashboard.xml"
If _XMLFileOpen($sFile) Then
Local $sLvl = _XMLGetAttrib("/testResults/buildNumber", "number")
ConsoleWrite($sLvl & @LF)
$groups_count = _XMLGetNodeCount("/testResults/testArea/param")
ConsoleWrite($groups_count & @LF)
EndIf
I am trying to get all the attribute values and node values in a data structure but I am stuck at the first step itself :-(.. Can anyone help me with the script to get the attribute and node values of th above xml... Thanks..
My XML:
<?xml version="1.0" encoding="UTF-8"?>
<testResults>
<buildNumber number=1290_100/>
<serverName>tc1</serverName>
<resultsURL>http://qa-xppro-test/tc1/smokeTest_2013_02_01.html</resultsURL>
<testArea name="WebServiceAPITest">
<param name="total">35</param>
<param name="pass">35</param>
<param name="errors">0</param>
<param name="timeTaken">19.36</param>
</testArea>
<testArea name="restAPI">
<param name="total">35</param>
<param name="pass">35</param>
<param name="errors">0</param>
<param name="timeTaken">19.36</param>
</testArea>
</testResults>
My script:
#include <_XMLDomWrapper.au3>
#include <File.au3>
Global $sFile = "dashboard.xml"
If _XMLFileOpen($sFile) Then
Local $sLvl = _XMLGetAttrib("/testResults/buildNumber", "number")
ConsoleWrite($sLvl & @LF)
$groups_count = _XMLGetNodeCount("/testResults/testArea/param")
ConsoleWrite($groups_count & @LF)
EndIf
I am trying to get all the attribute values and node values in a data structure but I am stuck at the first step itself :-(.. Can anyone help me with the script to get the attribute and node values of th above xml... Thanks..