Page 1 of 1

Text or XML File

PostPosted: Sun Sep 21, 2014 8:29 am
by MrRiversideDude
Are there any code examples of reading an external text or xml file from a strategy?

Thanks in advance!

Re: Text or XML File

PostPosted: Mon Sep 22, 2014 11:04 am
by Valeria
Hi MrRiversideDude,

Sure, please use this snip of code:

Code: Select all
local f = io.open('c:\\1.xml', 'r')
    local xml = f:read('*all')
    f:close()

Re: Text or XML File

PostPosted: Wed Sep 24, 2014 12:05 am
by MrRiversideDude
Thanks. But any more examples? I want examples on stepping through the file and capturing values?

Thanks in advance.

Re: Text or XML File

PostPosted: Fri Sep 26, 2014 12:27 am
by Valeria
Hi MrRiversideDude,

You can learn more examples here.