On Jan 16, 2007, at 7:38 PM, Derek Bump wrote:
Bill Marriott wrote:
I can say that once you figure out what two or three commands you
need to use to parse an XML file, it's way faster than using chunk
expressions or some other method.
This is really what I ended up doing. I created my own "ripText"
function which pulls the data I need, via offsets, provided it
follows the XML format's rules. If it doesn't, I throw an error.
And since it's standardized (it's the OpenSearch format), any
errors generated are the result of the XML author and not my program.
I tried Sarah's stack and was amazed as to how nicely it parses the
XML, but I found that incorporating all of the RevXML commands into
what should be a simple function was all too complicated (not
Sarah's stack, but RevXML itself).
There's a learning curve, and you're right, XML can get quite
complicated depending on who's writing it. I mean look at RSS...
depending on the version: you could be there for hours. ;)
True! That's why I wrote a simple plugin to my XML parsing library
for dealing with RSS feeds, so you could do things like:
stsXML_GetRSSItemTitles(<channelNumber>) --> list of article titles
stsXML_GetRSSItemProperty(<titleOfArticle>,<property>) -->
retrieves a property for an item
So you can do something like this:
put stsXML_GetRSSItemProperty("MyApp receives kudos at MacWorld
Expo","link") into tURL
revGoURL tURL
:-)
Ken Ray
Sons of Thunder Software, Inc.
Web Site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
(BTW: If anyone's interested in my parsing library or the RSS Plugin,
you can take a look at:
http://www.sonsothunder.com/products/xmllib/xmllib.htm
http://www.sonsothunder.com/products/xmllib/xmllib_rssplugin.htm )
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution