KevinH, sorry to flood the thread with zips, but here a new version
I tried the NCX code against on all the mobis I could lay my hands on...
The only "real" error I got was with really fat ebooks (technical books with more than a thousand entries), the INDX1 is splitted across more than one section !
I first added a few checks to prevent exceptions, but more importantly found out the the actual number of "data" INDX sections is stored in the INDX0.
So I modified the code to take this into account and parse multiple INDXx.
In the zip file you'll find a file for this test case, a dummy book with 4000 entries on 5 levels (that's a 600kb ncx...)
While I was at it, as suggested by siebert, I used his tagx code to parse the rest of INDX0, but still doesn't do anything with the data.
Please use this version instead if the previous if you plan on integrating the changes.
Thanks, fand.
PS: i also included the (simplistic) script I used to test the code on all my books, if someone interested...