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

Feature | Map Namespaces for XPath #13

Merged
merged 17 commits into from
Nov 5, 2023
Merged

Conversation

Sammyjo20
Copy link
Member

@Sammyjo20 Sammyjo20 commented Nov 5, 2023

This PR fixes #10 by automatically removing all root namespaces if they haven't been mapped. The end user can now choose to map them if they decide to keep it using the second argument of the xpathElement or xpathValue method.

This PR also renames the withAttributes method to attributes for better consistency on the element and value methods.

@Sammyjo20 Sammyjo20 marked this pull request as draft November 5, 2023 14:36
Copy link
Member Author

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

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

Self review

src/XmlReader.php Outdated Show resolved Hide resolved
@Sammyjo20 Sammyjo20 marked this pull request as ready for review November 5, 2023 20:30
Copy link
Member Author

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

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

Self review

Copy link
Member Author

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

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

Final Self Review

@Sammyjo20 Sammyjo20 merged commit 5bb7c87 into v1 Nov 5, 2023
10 checks passed
@Sammyjo20 Sammyjo20 deleted the fix/hide-root-namespace-on-xpath branch November 5, 2023 22:14
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.

Xpath doesn't work when xmlns is used
2 participants