Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
babuhari123
Visitor

How to parse xml file from localfile with out using http req

Hi friend,

My problem is my xml file is in source folder i want to parse that xml file but i dont know how to call that xml file without using http request can any one tell me how parse that local xml file if possible one small example please....
0 Kudos
2 REPLIES 2
renojim
Community Streaming Expert

Re: How to parse xml file from localfile with out using http

If it's in your source directory (and I'd recommend creating a separate directory for your XML file(s)), you have to read it into a string variable. Something like this:

xml = ReadAsciiFile("pkg:/source/myxml.xml")
xmlel = CreateObject("roXmlElement")
xmlel.Parse(xml)

Hope this helps!
-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
babuhari123
Visitor

Re: How to parse xml file from localfile with out using http

Thanq for reply
0 Kudos