XML - Saving Other Data as XML Data
There are situations in which you may, during development, want to capture data from a SQL database or other data source and save it as XML data. For example, it may be desirable to create an XML data file of country names, postal codes, or other static data to be used in an application. Or, it may be useful to work with XML data, without the need for a live database connection. Logi reporting products make it very easy to do this, following these steps:
- Turn on debugging, using the Debug icon in Studio's toolbar or by configuring your application's _Settings definition, General element's Debugger Style attribute to DebuggingLinks and saving the definition.
- Run the Logi report that retrieves the desired SQL data or data from another datasource.
- Click the debug link or icon at the bottom of the report page.
- As shown above, find the View File Stream Data link in the Debugger Trace Report page and click it. This should open the XML in the datalayer in your browser in a data table.
- Click the View raw XML link to view the formatted XML data by itself.
- Right-click in the browser and select View Source. This should open the data in Notepad or some other text editor.
- Save the data in the text editor to a file with an .xml extension.
The data is now ready to be used with Logi applications and can be retrieved using DataLayer.XML.