-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[DomCrawler] Document XPath expression evaluation #7033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
The ``evaluate()`` method evaluates the given XPath expression. | ||
The return value depends if the expression operates on simple values | ||
(like html attributes), or returns a subset of the current document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
html attributes
-> HTML attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear and complete ! Thank you :)
@@ -282,6 +282,60 @@ and :phpclass:`DOMNode` objects: | |||
|
|||
$html = $crawler->html(); | |||
|
|||
Expression evaluation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Evaluation
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The ``evaluate()`` method evaluates the given XPath expression. | ||
The return value depends if the expression operates on simple values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends on?
|
||
The ``evaluate()`` method evaluates the given XPath expression. | ||
The return value depends on if the expression operates on simple values | ||
(like HTML attributes), or returns a subset of the current document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"[...] if the expression operates on simple values (like HTML attributes) or a subset of the current document." ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better!
|
||
This behavior is best illustrated with examples: | ||
|
||
.. code-block:: php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please transform these 3 lines to This behaviour is best illustrated with examples::
👍 |
This PR was merged into the master branch. Discussion ---------- [DomCrawler] Document XPath expression evaluation Documents symfony/symfony#19430 Commits ------- 156b047 [DomCrawler] Document XPath expression evaluation
Documents symfony/symfony#19430