Rev XML and my large XML file...

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Rev XML and my large XML file...

Post by Garrett » Wed Sep 09, 2009 8:23 pm

Ok, can Rev handle this 23 gig XML file using the XML features of Rev?

Could I for instance, have a search criteria and using the XML features of Rev search specific tags for my criteria, which is over 3 million entries and it not take hours or days to accomplish this?

As it is now, I'm generating an index file that contains all the article titles and their starting character positions within the file, and planned on searching only this index file for the search criteria.

But was wondering if this was the right approach to this, or if using Rev's XML features might be a better and possibly quicker approach.

Any advice greatly appreciated.

Thanks,
~Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed Sep 09, 2009 8:59 pm

As mentioned in a previous reply, trying to load it as a whole into a tree will not be feasible; using an indexing scheme to the starting position in the file will get you somewhere, but the rev XML library won't be of help in that department.
Importing the whole thing into a properly normalized database (but using the SAX approach to minimize memory overhead) is probably the best approach - but then I'm partial to databases ;-)

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Wed Sep 09, 2009 9:59 pm

for such cases, the xml handlers allow you to get the data without building a tree. You use the revCreateXMLTreeFromFile function, with the second parameter set to "false" and the third set to "true". Then you can use the messages (for example "revStartXMLData") that it sends, to do whatever you want. However, for some stuff this approach is not usable.

look up in the dictionary (not a encompassing list):
revCreateXMLTreeFromFile
revXMLStartTree
revStartXMLNode
revEndXMLNode
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Thu Sep 10, 2009 3:57 am

@Jan: Right, I remember what you said now.. Forgot about that :(

@BvG: Thanks, I'll read more. I did briefly check the doc's out on the rev stuff, but wanted opinions first before attempting anything.

Thanks a bunch again everyone :-)
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)

Post Reply