This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a0186d
commit 5a807f1
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
SaXPath | ||
======= | ||
Simple XPath evaluator which runs against a SAX stream. | ||
|
||
Supported XPath construct as of writing are: | ||
- '/'-axis (child) | ||
- '//'-axis (self-or-descendant) | ||
- node name tests | ||
- predicate test (@<attribute_name> = "<literal>") | ||
|
||
Inner workings | ||
-------------- | ||
A state machine is built which the SAX-nodes are tested against. If a node matches, the state machine progresses. | ||
|
||
For self-or-descendant-nodes, the state machine is forked and earch fork (including the parent) is tested against the SAX-nodes. This ensures all nodes are matched. See test/saxpath.js and test/inception.xml for an example. |