Skip to content

[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

Merged
merged 1 commit into from
Nov 10, 2016
Merged

[DomCrawler] Document XPath expression evaluation #7033

merged 1 commit into from
Nov 10, 2016

Conversation

jakzal
Copy link
Contributor

@jakzal jakzal commented Oct 4, 2016

Copy link
Member

@javiereguiluz javiereguiluz left a 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

html attributes -> HTML attributes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor

@mickaelandrieu mickaelandrieu left a 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
Copy link
Member

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
Copy link
Member

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.
Copy link
Member

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." ?

Copy link
Contributor Author

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
Copy link
Member

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::

@wouterj
Copy link
Member

wouterj commented Nov 9, 2016

👍
status: reviewed

@wouterj wouterj added this to the 3.2 milestone Nov 9, 2016
@wouterj wouterj merged commit 156b047 into symfony:master Nov 10, 2016
wouterj added a commit that referenced this pull request Nov 10, 2016
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
@wouterj
Copy link
Member

wouterj commented Nov 10, 2016

Thanks @jakzal! I've done some rewrites while merging in 67706f6 to remove some duplication in this paragraph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants