any good starter tutorials for using Rev's built in XML?

Trevor DeVore lists at mangomultimedia.com
Thu Jun 17 11:03:46 EDT 2004


On Jun 17, 2004, at 1:21 AM, Frank Leahy wrote:
> On Jun 17, 2004, at 1:34 AM, use-revolution-request at lists.runrev.com 
> wrote:
>>
>> If you find a tutorial, please let me know.
>
> Me too.
>>
>> I think the problem is that XML is a new set of knowledge and the XML
>> functions are a new set of functions. If I already understood XML,
>> chances are that the functions would make perfect sense to me. But I'm
>> learning XML and the functions are not obvious without any context.
>
> Kee, it's not you.  I used Microsoft's MSXML parser extensively for 
> Wired/Terra/Lycos for over 4 years, and I know it inside out, but I 
> can't for the life of me figure out the RR XML parser.
>>
>> There is an example XML stack but it is not an XML example stack. It
>> does useful work rather than just provide examples of how each 
>> function
>> would be used.
>
> It may exercise many of the XML functions, but it's very difficult to 
> track down where they're called.  And it's also not clear that it 
> exercise's them all.
>
>> For an XML example stack, I'd like to see sample XML stored in the
>> stack, and then how you would use the functions to access the various
>> pieces of data in that sample set of XML. I don't want it to do useful
>> work. I just want to understand that given this XML, if you use these
>> functions, you end up with this result. Then the names of the 
>> functions
>> and how to use them might become clearer.
>
> It wouldn't seem to be too much to ask for a call by call description, 
> with even one simple example for each call.
>
> The code is presumably ported from somewhere else (I doubt they built 
> their own parser from scratch) -- the least they could do is point us 
> at the docs for the original source.

Perhaps we can start putting together a tutorial.  If someone would 
provide some sample data along with what they want to accomplish with 
it I could put together some basic examples that we could eventually 
flesh out into a tutorial.  We could have examples that show both 
creating an XML tree in memory ( revCreateXMLTree (tXMLText, true, 
true, false) ) and event based parsing ( revCreateXMLTree (tXMLText, 
true, false, true) ).

If creating a tree in memory then revCreateXMLTree returns an id that 
represents that tree and you can use functions like revXMLFirstChild, 
revXMLNextSibling, revXMLAttribute, etc. to manipulate and access the 
data in the tree.  Basically anything that takes a treeID as the first 
parameter.

Perhaps the event based parsing is based on expat 
(http://expat.sourceforge.net/) though I'm not sure.  It is basically 
the same idea though in that you will receive messages when new nodes 
and data are encountered i.e. revStartXMLNode, revEndXMLNode, 
revStartXMLData, etc..

Anyway, if anyones is interested then send me some sample data.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list