kooljay68
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2012
06:27 PM
DeviantArt example no rss but with xml file
I am very new to all this and not the worlds best programmer by any means. But I am learning as best I can and I cannot for the life of me figure out how to convert the deviantArt example to use just and XML file (and with what data) instead of an RSS feed?
Any help would be great.
Thank you
Any help would be great.
Thank you
2 REPLIES 2
kooljay68
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2012
09:07 AM
Re: DeviantArt example no rss but with xml file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>4</resultLength>
<!-- endIndix indicates the number of results for this *paged* section of the feed -->
<endIndex>4</endIndex>
<item>
<title>Private</title>
<URL>http://allbabestv.com/roku/img/10001.jpg</URL>
</item>
<item>
<title>Private</title>
<URL>http://allbabestv.com/roku/img/10002.jpg</URL>
</item>
<item>
<title>Private</title>
<URL>http://allbabestv.com/roku/img/10003.jpg</URL>
</item>
<item>
<title>Private</title>
<URL>http://allbabestv.com/roku/img/10004.jpg</URL>
</item>
</feed>
Why can I not just get the example to read a file like this ???

RokuRobB
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2012
10:57 AM
Re: DeviantArt example no rss but with xml file
Here is some sample code that reads teh contents of your XML. Add the XML as feed.xml to a folder called xml in the channel package and you should be good to go:
Function loadXml() as void
feed = CreateObject("roXMLElement")
feed.Parse(ReadAsciiFile("pkg:/xml/feed.xml"))
resultLength = feed.resultLength.GetText()
for each item in feed.item
print "Title: " + item.title.GetText()
print "URL: " + item.URL.GetText()
end for
End Function
Function loadXml() as void
feed = CreateObject("roXMLElement")
feed.Parse(ReadAsciiFile("pkg:/xml/feed.xml"))
resultLength = feed.resultLength.GetText()
for each item in feed.item
print "Title: " + item.title.GetText()
print "URL: " + item.URL.GetText()
end for
End Function