CssSelector

CssSelector

class CssSelector

CssSelector is the main entry point of the component and can convert CSS selectors to XPath expressions.

$xpath = CssSelector::toXpath('h1.foo');

This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect.

Copyright (c) 2007-2012 Ian Bicking and contributors. See AUTHORS for more details.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materia