;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara /* Objective(s) - This program illustrates the use of following attributes of Object Collection Storage About the Program - This program demonstrates the capability of XML Collection to retrieve the data from unicode XML File present at a specified URL.Further it displays the data fetched in a Report and maps the response XML to a TDL Object - The XML data thus fetched from the XML File is displayed in a Report. Dependencies - - Supporting files 'XML Data.txt' & 'Simple Get.txt' - Copy the XML content available in 'TestXML.XML' and paste in a webhook link and use the same in the Collection datasource/Remote URL */ [#Menu: Gateway of Tally] Add: Item: Object : Display: TSPL XML Get CollObjSpec ;; Report displaying XML Data [Report: TSPL XML Get CollObjSpec] Form : TSPL XML Get CollObjSpec Title : "Simple Get Request With Object Specification" [Form: TSPL XML Get CollObjSpec] Parts : TSPL XML Get CollObjSpec Height : 35% Screen Width : 60% Screen Buttons : PrintButton, ExportButton, UploadButton, MailButton FullObject : Yes [Part: TSPL XML Get CollObjSpec] Lines : TSPL XML Get CollObjSpec Repeat : TSPL XML Get CollObjSpec : TSPL XML Get CollObjSpec Scroll : Vertical [Line: TSPL XML Get CollObjSpec] Fields : TSPL XML Name, TSPL XMLEmp ID Explode : TSPL XML Phone Explode : TSPL XML Add FullObject : Yes [Field: TSPL XMLName] Set As : "Name : " + $NAME [Field: TSPL XMLEmp ID] Set As : "Employee ID :" + $EMPID Indent : 10 ;; Explode Part - XML Phone [Part: TSPL XML Phone] Lines : TSPL XML Get CollPhone Repeat : TSPL XML Get CollPhone : Phone Scroll : Vertical [Line: TSPL XML Get CollPhone] Fields : Name Field , TSPL XML Office, TSPL XML Home, TSPL XML Mobile Local : Field : Name Field : Set As : "Phone No" [Field: TSPL XML Office] Set As : "Office:" + $OfficeNo [Field: TSPL XML Home] Set As : "Home :" + $HomeNo [Field: TSPL XML Mobile] Set As : "Mobile :" + $Mobile ;; Explode Part - XML Add [Part: TSPL XML Add] Lines : TSPL XML Get CollAdd Repeat : TSPL XML Get CollAdd : Address Scroll : Vertical [Line: TSPL XML Get CollAdd] Fields : TSPL XML Add1 Explode : TSPL XML Addr Line [Field: TSPL XML Add1] Use : Name Field Set As : "Address" ;; Explode Part - XML Addr Line [Part: TSPL XML Addr Line] Lines : TSPL XML Get Addrline Repeat : TSPl XML Get Addrline : AddrLine Scroll : Vertical [Line: TSPL XML Get Addrline] Fields : TSPL XML Add2 [Field: TSPL XML Add2] Set As : $ADDRLINE Indent : 5 ;; Collection retrieving data from an XML file located at a predefined URL [Collection: TSPL XML Get CollObjSpec] Data Source: HTTP XML : "https://webhook.site/304c504d-0a50-4336-b0e3-e6c1704b7506" ;; URL specification XML Object : TSPL Customer Data ;; TDL Object Specification Client Only : Yes ;; Specification starts here [Object: TSPL Customer Data] Storage : Name : String Storage : EmpId : String Collection : Phone : TSPL XML Phone Coll ;; Complex Collection Collection : Address : TSPL XML AddressColl ;; Complex Collection [Object: TSPL XML Phone Coll] Storage : OfficeNo : String Storage : HomeNo : String Storage : Mobile : String [Object: TSPL XML AddressColl] Collection : AddrLine : String ;; Simple Collection ;; End-of-File