Code Monkey home page Code Monkey logo

core's Introduction

CI/CD Maven Central GitHub top language Coverage

License EO principles respected here

logo

XpathQS

A library for building Xpath queries in an OOP style. In a JOOQ way, but for the XPATH.

Usage

Apache Maven

<dependency>
  <groupId>org.xpathqs</groupId>
  <artifactId>core</artifactId>
  <version>0.0.7</version>
</dependency>

Gradle Kotlin DSL

implementation("org.xpathqs:core:0.0.7")

Gradle Groovy DSL

implementation 'org.xpathqs:core:0.0.7'

Quick Example

Simple selector with tag and text:

tagSelector("div").text("demo").toXpath()

Will return such XPATH query:

//div[text()='test']

Selector with tag, text contains, and position:

tagSelector("div").text("test", contains = true)[2].toXpath()

Result:

//div[contains(text(), 'test') and position()=2]

For more examples you can discover unit tests.

Immutability

...

Coding conventions

  1. One line per func call

Unit Tests notation

Self Documentation

Each public method should:

  • contain java-doc
  • have a contract and requirements
  • have a link to the unit-tests associated with a concrete requirement

License

This XpathQS lib is released under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.