Dr. Strangelove (or: How I Learned to Stop Worrying and Love XML)
Derek Bump
list at dreamscapesoftware.com
Tue Jan 16 20:38:51 EST 2007
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. ;)
Thanks to everyone that helped me out. I really appreciate it!
Derek Bump
Dreamscape Software
http://www.dreamscapesoftware.com/
More information about the use-livecode
mailing list