Posts

Showing posts from September, 2018

Read XML String and load the data in Controls

We can read a XML string and parse the data based on the XML tags and load the data into our UI COntrols. In the following example a Customer data is sent as XML String, We are going to retrieve the Customer Name, Address and City and load the same in the Edit Controls. s XML is string = "<?xml version='1.0' encoding='utf-8'?><XMLHDR><RESULT>TRUE</RESULT><CUSTOMER><NAME>TESTNAME</NAME><ADDRESS>12 A BLOCK</ADDRESS><STREET>15TH STREET</STREET><CITY>CHENNAI</CITY></CUSTOMER></XMLHDR>" XMLDocument ( "XMLOrd" , s XML )  XMLFirst ( "XMLOrd" ) XMLChild ( "XMLOrd" ) IF XMLElementName ( "XMLOrd" ) = "RESULT" THEN        IF XMLData ( "XMLOrd" ) = "TRUE" THEN                               WHILE XMLOut ( "XMLOrd"...