in reply to Re: Idea for XPath implementation
in thread Idea for XPath implementation

First all <bad>'s are searched for and traced back. In this way, you get all the query results.

You make a good point about the slow linear search but as i mentioned in my post, i want to keep the idea clear so i didn't talk about optimisations. However, the order of the array is important for some XPath queries so we'd make a second - binary sorted - array for speed.