On Sat, 2013-03-30 at 08:02 +0100, Martin B. wrote: [...] > It turns out however, that the subtree where the large data resides has > to be read not in-order, but I have to collect some (small amount of) > data before the other. Do you process the file only once, or many times, between times when it changes?
If you process the large file multiple times, and you have to re-engineer the code, you could consider something like dbxml, which will parse the document once and can make an index; subsequence accesses can be fairly fast because there's no need to read the file. If you process the large file at most once every time it changes, using an XQery engine like dbxml isn't so obvious a win: it can still help with the out-of-order access in some cases, but the gains might not be worth the engineering effort of reworking your code. As Daniel has said, libxml is pretty fast at parsing, so another strategy might be fetching only the parts you need into a new, smaller XML document and then using XSLT. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml