xpath-query
v0.0.1
Published
Create Xpath query in javascript
Downloads
4
Maintainers
Readme
xpath-query
Create Xpath query in javascript
Install
Run
$ npm test
$ npm run build
$ npm run lint
API
- tag
- findByText
- findByTextContent
- following
- select
- first
- last
- all
- attribute
- custom
Demo
import XpathUtils from '../src/index'
const Xpath = new XpathUtils()
const request = Xpath.request()
.tag(['input', 'span'])
.tag(['h1', 'h2', 'h3'])
.done()
// result '//input/h1 | //input/h2 | //input/h3 | //span/h1 | //span/h2 | //span/h3'