Download the PHP package querypath/querypath without Composer

On this page you can find all versions of the php package querypath/querypath. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package querypath

Use GravityPDF's QueryPath

QueryPath is now updated and maintained by the amazing folks at GravityPDF. https://github.com/GravityPDF/querypath. The version of QueryPath in this repository is no longer maintained. You are encouraged to use GravityPDF's version. -- Matt, Dec. 2022

QueryPath: Find your way.

Stability: Maintenance

Authors: Matt Butcher (lead), Emily Brand, and many others

Website | API Docs | VCS and Issue Tracking | Support List | Developer List | Pear channel |

This package is licensed under an MIT license (COPYING-MIT.txt).

At A Glance

QueryPath is a jQuery-like library for working with XML and HTML documents in PHP. It now contains support for HTML5 via the HTML5-PHP project.

Gettings Started

Assuming you have successfully installed QueryPath via Composer, you can parse documents like this:

But the real power comes from chaining. Check out the example below.

Example Usage

Say we have a document like this:

And say that the above is stored in the variable $xml. Now we can use QueryPath like this:

(This example is in examples/at-a-glance.php.)

With over 60 functions and robust support for chaining, you can accomplish sophisticated XML and HTML processing using QueryPath.

QueryPath Installers

The preferred method of installing QueryPath is via Composer.

You can also download the package from GitHub.

Composer (Preferred)

To add QueryPath as a library in your project, add this to the 'require' section of your composer.json:

The run php composer.phar install in that directory.

To stay up to date on stable code, you can use dev-master instead of >=3.0.0.

Manual Install

You can either download a stable release from the GitHub Tags page or you can use git to clone this repository and work from the code.

Including QueryPath

As of QueryPath 3.x, QueryPath uses the Composer autoloader if you installed with composer:

Without Composer, you can include QueryPath like this:

QueryPath can also be compiled into a Phar and then included like this:

From there, the main functions you will want to use are qp() (alias of QueryPath::with()) and htmlqp() (alias of QueryPath::withHTML()). Start with the API docs.


All versions of querypath with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
masterminds/html5 Version 2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package querypath/querypath contains the following files

Loading the files please wait ....