Skip to content
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

fix(xpath): Adjust text methods to match lxml #30

Merged
merged 1 commit into from
Feb 18, 2024
Merged

Conversation

James-LG
Copy link
Owner

@James-LG James-LG commented Feb 18, 2024

Adds an itertext() method to XpathItemTreeNode that behaves like lxml's itertext method.

Also adjusted XpathItemTreeNode::text() method such that it matches the behaviour of lxml's text() method.

Other fixes:

  • Orders xpath results in document order
  • Text nodes automatically unescape commonly escaped characters such as gt; -> >
    • Added unescape_characters() and escape_characters() functions to easily move between them

Fixes #26

@James-LG James-LG force-pushed the james/text branch 2 times, most recently from e528b5c to a9ad009 Compare February 18, 2024 17:16
Other fixes:

* Orders xpath results in document order
@James-LG James-LG merged commit 3b4e04b into master Feb 18, 2024
2 checks passed
@James-LG James-LG deleted the james/text branch February 18, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing whitespace characters in text
1 participant