Formatting XML Data
Derek Bump
list at dreamscapesoftware.com
Wed Jan 24 00:40:38 EST 2007
Hello Bridger,
It must have been 2 week ago that I was asking the list the very same
question. The answers I got were excellent and put a lot of my
questions to rest.
First, you should check out Sarah Reichelt's excellent demo for revXML,
which is located at: http://www.troz.net/Rev/tutorials/XMLdemo1.rev.gz
After that, check out Ken Ray's XML Parsing Library, which is located
at: http://www.sonsothunder.com/
And finally, I quote Bill Marriott:
> The problem with XML is that people can do any old thing they want with it.
> While the RULES are ridiculously strict, the implementations can drive you
> nuts. For example, look at the cookies.plist file on a Mac. It has a really
> wacky setup that I think makes it all but impossible to parse with the
> RevXML library without "walking" through it. Its something like:
>
> <person>
> <attributes>
> <field>Name</field>
> <value>Bill</value>
> <field>EyeColor</field>
> <value>Blue</value>
> </attributes>
> </person>
>
> Whereas the Rev library seems to make it easier to do something like:
>
> <person name="Bill" eyecolor="blue" />
>
> To be honest, I usually poke around in Sarah's stack and then figure out
> which function(s) I need through trial and error. It's just harder for me to
> "visualize" what I want to accomplish with XML.
>
> 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.
I hope that helps!
Derek Bump
Dreamscape Software
http://www.dreamscapesoftware.com/
Bridger Maxwell wrote:
> Hey, I am a first time XML user, just testing it out. I noticed that
> the text returned by the revXMLText() function has no formatting
> (returns, tabs) and isn't very easy to read. Is there a way to
> format this so it is easier to read, or would it be best to keep the
> XML how it is now? I am not sure what the standard is, but I thought
> XML should be formatted to be easy to read, like HTML.
>
>
> TTFN Bridger Maxwell Christa McAuliffe Space Education Center
> _______________________________________________ use-revolution
> mailing list use-revolution at lists.runrev.com Please visit this url to
> subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
More information about the use-livecode
mailing list