xpath-lexer
v1.2.2
Published
A lexer for XPath 1.0 expressions.
Downloads
111
Readme
xpath-lexer
A lexer for XPath 1.0 expressions.
Installation
The package can be installed with npm
.
$ npm install xpath-lexer
Usage
var XPathLexer = require("xpath-lexer");
var lexer = new XPathLexer("//foo:bar[@id='baz']");
lexer.next() // => "//"
lexer.next() // => "foo:bar"
lexer.next() // => "["
lexer.next() // => "@"
lexer.next() // => "id"
lexer.next() // => "="
lexer.next() // => "'baz'"
lexer.next() // => "]"