[Use-revolution] Re: Revolution and XML

Terry Judd tsj at unimelb.edu.au
Thu Nov 29 17:28:02 EST 2001

>on 29/11/01 4:28 AM, Terry Judd at tsj at unimelb.edu.au wrote:
>>  Fine?? I don't doubt you can do it but I do question whether a generic
>>  scripted solution is workable. Some Director dude that is more experienced
>>  than I (and I'm no neophyte) has written a fairly robust xml parser in lingo
>>  but give it a file with a large number of tags that is more that a few K in
>>  size to chew on and it really chugs.
>on 29/11/01 6:43 AM, Chipp Walters at chipp at chipp.com wrote:
>>  It would seem with regular expressions and compiled scripts it could be
>>  significantly faster than Director. I don't think director is a very good
>>  string manimulator in general. At least the last time I looked, it was
>  > pretty laborious, more so than HyperCard, SuperCard. Just my two cents.

You're right - Director doesn't have all the string manipulating 
features of MC, SC etc (i.e. no lineDel, lineOffset) but it's no 
slouch at 'search and replace' on fairly large chunks of text. Like 
you say, regex may make the real difference - whether this could come 
close to performance of an external though??

Then Ben wrote...

>The one I've written (very crude at the moment - I've concentrated on making
>the API work first, then going back to refine the parser) seems perfectly
>speedy.  One of my test documents is about 350K, 5000 lines, 8000 elements -
>seems plenty fast enough.  My parsing is crude, if I make it more robust it
>may get slower - but then I bet someone with more Rev knowledge than me
>could optimise it anyway (I haven't used regex).

Sounds like you've made great progress already.

>I think Rev/MC is a superb text manipulating engine. I think Director is a
>lousy one.

Then Ken wrote...

>Hey, Ben... can you post your code? It would be a great one to "optimize" on
>the list (just like we did with the "Constraining Movement" thread)...

Good idea (if this is something Ben is willing to give away)

Dr Terry Judd

Lecturer in Instructional Design / Multimedia Developer
Biomedical Multimedia Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne
Email: t.judd at bmu.unimelb.edu.au
Phone: 03 9344 0187
Fax: 03 9344 4998

More information about the use-livecode mailing list