revXML

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

revXML

Post by keyless »

Trying to use revXML to take in a RSS feed and display some of the data in fields.

While Sarah Reichelt XML tutorial is excellent it stays in the "Tree" so to speak, and doesn't really go into detail of what you can do with the data once you have it in a nice tidy tree.

Rev's RSS tutorial, well is that really a tutorial? more of a demo stack with a few explinations how some parts of it work. and swapping out the feed URL with the one I want didn't work in demo stack either.

Long story short, here I sit with my data in a nice tree and I know the ID. I now want to put The data that is in that tree into a field like this

title
link
description

title
link
description

etc.


How do I parse the XML tro to text data like that in a field?
keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless »

I've found some good leads searching the list, but I keep getting errors. I think my problem is I am not getting startnode path right when using any of the revXML functions.

Can't show the RSS I need to parse, but here is one I got from twitter that is very similar.

What would the Proper revXMLNodeContents script be if I wanted to put
title, description and pubdate of both items into a field?

(I formated this up using one of Sarah's functions, thanks Sarah)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Twitter public timeline</title>
		<link>http://twitter.com/public_timeline</link>
		<description>Twitter updates from everyone!</description>
		<language>en-us</language>
		<ttl>40</ttl>
		<item>
			<title>ajolo: No recomiendo usar fring + twitter</title>
			<description>ajolo: No recomiendo usar fring + twitter</description>
			<pubDate>Fri, 17 Apr 2009 04:43:30 +0000</pubDate>
			<guid>http://twitter.com/ajolo/statuses/1539709265</guid>
			<link>http://twitter.com/ajolo/statuses/1539709265</link>
		</item>
		<item>
			<title>yoclaudia: @fountainheads If I describe her here, and she reads it, she might know it's her. Wheee, halatang halata eh.</title>
			<description>yoclaudia: @fountainheads If I describe her here, and she reads it, she might know it's her. Wheee, halatang halata eh.</description>
			<pubDate>Fri, 17 Apr 2009 04:43:30 +0000</pubDate>
			<guid>http://twitter.com/yoclaudia/statuses/1539709262</guid>
			<link>http://twitter.com/yoclaudia/statuses/1539709262</link>
		</item>
keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless »

Ok so i figured out I can use revXMLRootNode to figure out the start node (right?) so for this XML it is: rss. I think that is one of my problems as I was starting at channel. I'll play with that, hopefully someone can enlighten me a little more on how to handle this XML in rev.

Thanks in advance.
keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless »

Ok since no one is posting, I'll run this like a blog of self descovery.

The problem was that I was not putting in the right start node.

Now I have revXMLChildContents working, and that looks like the key to calling the data for parse. Now to just figure out how to actually parse it out.
keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless »

I revisited the Rev XML demo stack, and got it to work by adding the correct Start Node. Ok now I'm cooking with gas.
DavidBurleigh
Posts: 19
Joined: Sun Apr 05, 2009 9:27 am

Where is the Rev XML demo stack?

Post by DavidBurleigh »

Where is the Rev XML demo stack?

I'm using 2.9, is it in there?
or do I have to download it from somewhere?
or is it only available for 3.0?

thanks
keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless »

Not sure if it is 2.9, its on the Rev website though.

http://www.runrev.com/developers/tutori ... rss-feeds/
theotherbassist
Posts: 115
Joined: Thu Mar 06, 2014 9:29 am

Re: revXML

Post by theotherbassist »

Idk how helpful this is now, but I uploaded a barebones RSS reader a while ago. It's not a bad starting point.

http://forums.livecode.com/viewtopic.ph ... 34#p141734
Post Reply