1. A system to process an XML document, comprising:
a streaming parser, running on one more processors, adapted to parse an XML document and generate a stream of discrete pieces of the XML document, wherein the XML document is represented using a hierarchical data structure, and each said discrete piece of the document is represented by one or more nodes in the hierarchical data structure;
a matching component, operating on the hierarchical data structure, capable of performing the steps of:
accepting a discrete piece of the XML document from the stream of discrete pieces from the streaming parser at one time;
keeping in memory only said discrete piece of the XML document from the stream at said time;
maintaining a plurality of contexts associated with the XML document in a context data structure, wherein each context of the plurality of contexts contains a node in the hierarchical data structure and a position of the node relative to a context node;
mapping each context of the plurality of contexts to the stream of discrete pieces of the XML document and performing a match against each context of the plurality of contexts on said discrete piece of the XML document from the stream; and
passing the particular discrete piece of the XML document to a user object for handling when the particular discrete piece of the XML document is a matched discrete piece of the XML document.
2. The system according to claim 1, wherein:
the hierarchical structure can be a XML tree with each node containing a portion of the document.
3. The system according to claim 1, wherein:
at least one of the plurality of contexts maintained by said matching component is XPath context.
4. The system according to claim 1, wherein:
said context data structure is a context stack, wherein new context can be added on said context stack and each context in the said context stack can be matched.
5. The system according to claim 1, wherein:
said context data structure is a context tree, wherein new context can be added on said context stack and each context in the said context tree can be matched.
6. The system according to claim 1, wherein:
the matching component is capable of keeping only a portion of the XML document in memory at any given time.
7. The system according to claim 1, wherein:
the matching component is capable of knowing the schema of the XML document and foreseeing the coming discrete pieces of the XML document.
8. The system according to claim 1, wherein:
the matching component is capable of performing an expression-based match, which uses an XPath query.
9. The system according to claim 1, wherein:
the matching component is capable of keeping, cloning and destroying the entirety or a portion of a sub-tree descending from a node in the tree.
10. The system according to claim 1, wherein:
the user object is capable of returning the matching event to an XML stream for use by any other component.
11. A method for processing an XML document, comprising:
parsing an XML document and generating a stream of discrete pieces of the XML document, wherein the XML document is represented using a hierarchical data structure, and each said discrete piece of the document is represented by one or more nodes in the hierarchical data structure;
accepting a discrete piece of the XML document from the stream of discrete pieces from the streaming parser at one time;
keeping in memory only said discrete piece of the XML document from the stream at said time;
maintaining a plurality of contexts associated with the XML document in a context data structure, wherein each context of the plurality of contexts contains a node in the hierarchical data structure and a position of the node relative to a context node;
mapping each context of the plurality of contexts to the stream of discrete pieces of the XML document and performing matching against each context of the plurality of contexts on said discrete piece of the XML document from the stream;
passing the particular discrete piece of the XML document to a user object for handling when the particular discrete piece of the XML document is a matched discrete piece of the XML document.
12. The method according to claim 11, further comprising:
representing the XML document in a hierarchical structure, which can be a tree with each node containing a portion of the document.
13. The method according to claim 11, further comprising:
allowing at least one of the plurality of contexts maintained to be XPath context.
14. The method according to claim 11, further comprising:
allowing the said context data structure to be a context stack, wherein new context can be added on said context stack and each context in the said context stack can be matched.
15. The method according to claim 11, further comprising:
allowing the said context data structure to be a context tree, wherein new context can be added on said context tree and each context in the said context tree can be matched.
16. The method according to claim 11, further comprising:
keeping only a portion of the XML document in memory at any given time.
17. The method according to claim 11, further comprising:
knowing the schema of the XML document and foreseeing the coming discrete pieces of the XML document.
18. The method according to claim 11, further comprising:
performing an expression-based match, which uses an XPath query.
19. The method according to claim 11, further comprising:
keeping, cloning and destroying the entirety or a portion of a sub-tree descending from a node in the tree.
20. The method according to claim 11, further comprising:
returning the matching event to an XML stream for use by any other component.
21. A method for locating and matching a portion of the document while representing a XML document in a stream of events, comprising:
parsing an XML document associated with a schema and generating a stream of discrete pieces of the XML document;
accepting a discrete piece of the XML document from the stream of discrete pieces from the streaming parser at one time;
analyzing the schema associated with the XML document and grabbing one or more discrete pieces of the XML document that is related to a particular discrete piece of the XML document based on the schema, wherein the particular discrete piece of the XML document comes after the one or more discrete pieces of the XML document;
keeping in memory only said one or more discrete pieces of the XML document and the particular discrete piece of the XML document from the stream to avoid go backward in the stream;
performing a match on each said discrete piece of the one or more discrete pieces and said particular discrete piece of the XML document from the stream; and
passing the particular discrete piece of the XML document to a user object for handling when the particular discrete piece of the XML document is a matched discrete piece of the XML document.
The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.
1. A computer implemented method for identifying at least one routing option for use in routing a user from a current location to at least one destination comprising:
receiving electronic data identifying at least one destination;
receiving electronic data indicating a current location; accessing, from the at least one memory device, historical information associated with at least one route segment, wherein the at least one route segment is interposed between the current location and the at least one destination;
receiving, from at least one navigation service provider, a current condition for each of the at least one route segment;
identifying, based on the current location, the historical information associated with at least one route segment, and the current condition for each of the at least one route segment, at least one routing option for use in routing a user from the current location to the at least one destination; and
outputting at least one navigation direction, wherein the at least one navigation direction include an identification of the at least one routing option.
2. The method of claim 1, comprising:
Converting the at least one navigation direction into at least one human audibly perceptible navigation instruction; and
outputting, via at least one speaker, the at least one human audibly perceptible navigation instruction.
3. The method of claim 1, comprising:
converting the at least one navigation direction into at least one human visually perceptible navigation instruction; and
outputting, via at least one display device, the at least one human visually perceptible navigation instruction.
4. The method of claim 3, comprising:
outputting, via the at least one display device, information regarding the at least one destination.
5. The method of claim 3, comprising:
receiving an indication of at least one website, wherein the at least one website identifies information relating to the at least one destination;
establishing an electronic connection with the at least one website;
accessing, via the at least one website, information relating to the at least one destination;
identifying at least one first portion of the information relating to the at least one destination; and
outputting, via the at least one display device, the first portion of the information relating to the at least one destination.
6. The method of claim 5, wherein the first portion of the information relating to the at least one destination is identified based on historical trip data.
7. The method of claim 5, wherein the first portion of the information relating to the at least one destination is identified based on a user preference.
8. The method of claim 1, wherein the data indicating the current location includes date and time data and the historical information associated with at least one route segment identifies a starting destination based on the date and time data.
9. The method of claim 1, wherein the historical information associated with at least one route segment identifies at least one statistic associated with at least one route segment.
10. The method of claim 1, wherein the at least one current condition indicates at least one road traffic condition.
11. The method of claim 1, wherein the destination is at least one point of interest.
12. The method of claim 1, wherein the electronic data identifying the at least one destination is received in response to a user selecting the at least one destination using at least one interface module.
13. The method of claim 12, wherein the at least one interface module includes a microphone for receiving a spoken identification of the at least one destination.
14. The method of claim 1, wherein the at least one destination is a dynamic destination and the method further comprises identifying the dynamic destination.
15. The method of claim 14, wherein the dynamic destination is identified based on historical trip date.
16. The method of claim 14, wherein the dynamic destination is identified based on at least one rating of a plurality of potential destinations satisfying one or more given criterion identified by a user using an interface module.
17. The method of claim 15, wherein at least one of the one or more given criterion identify a routine destination area and a second of the one or more given criterion identify one or more points of interest.
18. The method of claim 1, wherein the historical information includes statistical information associated with the user routinely traveling between a first location and the at least one destination on a first route at a first time of day, the first route including a plurality of route segments.
19. The method of claim 18, wherein the current location arises on at least one of the plurality of route segments for the first route.
20. The method of claim 1, further comprising accessing at least one user preference and wherein the identification of the at least one routing option is based, at least in part, on the at least one user preference.