ARLoadXML

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Return to XMLtoLua

Contents

Function

ARLoadXML(definitionFile, dataFile)
return value - a table representing the contents of an XML file, null if the file is not loaded
definitionFile - string XML file that specifies how the conversion is performed
dataFile - string XML file that is loaded and converted to Lua. The file is located under the Blue Mars user folder.

Usage

Notes

Use ARDownloadFile to download and save the dataFile to the user directory (if parsing XML is not required, see the alternate ARWebUtils.DownloadFile function, which returns data in a callback function).

Use ARSaveXML to convert a Lua table to an XML file.


Example

self.xmltable = ARLoadXML(self.Properties.recentgamesdef,self.Properties.xmlresults)


Troubleshooting

  • Check the return value - if it's null instead of a table, then XML file was not successfully read and converted
  • Check the - any mismatch between the definition file and the XML file will be reported
Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools