18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
How to read UTF-8 characters from XML file?
Hi All,
I am trying to read an XML file, which contains UTF-8 characters.
My XML file is:
My sahi code for reading XML is:
Kindly help in this issue.
I am trying to read an XML file, which contains UTF-8 characters.
My XML file is:
Now when I try to read this XML file and find the length of child nodes <TC>, it returns 0 length.<Entity>
<Action>
<TC ID="1">
<Obj name="rulename" type="textbox">गूगल</Obj>
<Enable></Enable>
<Disable></Disable>
</TC>
<TC ID="2">
<Obj name="szone" type="listbox">WAN</Obj>
<Enable></Enable>
<Disable></Disable>
</TC>
<TC ID="3">
<Obj name="dzone" type="listbox">WAN</Obj>
<Enable></Enable>
<Disable>4,5,6,7,8,9,10,11,12,13,14</Disable>
</TC>
</Action>
</Entity>
My sahi code for reading XML is:
And so, I am not able to proceed further, regarding reading value from TC ID=1.$xmlstr = _readFile($filename);
var $x = new XML($xmlstr);
var $ActLen = $x.Action.child("TC").length();
Kindly help in this issue.
Comments