xpath-query

0.0.1 • Public • Published

xpath-query

Create Xpath query in javascript

travis npm david-dm

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'

Package Sidebar

Install

npm i xpath-query

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • alexandre-g