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

XPath eval and dump to string #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dmalkr
Copy link

@dmalkr dmalkr commented Jan 17, 2022

Additional bindings for eval XPath and output result node set to ByteString.

c14n package output result in XML canonical form with buggy output (strips node attributes and texts),
like this:

<div><x1/><x2/></div>

instead of

<div id="a1">txt1<x1/>txt2<x2/>txt3</div>

In this PR I introduce evalXPath function which evaluate XPath and then dump node set to ByteString.

So we can write: evalXPath "<div id="a1">txt1<x1/>txt2<x2/>txt3</div>" "//div".

This is fast implementation just to make proper benchmarks in InferXPath.

@dmalkr dmalkr assigned mgajda and unassigned mgajda Jan 17, 2022
@dmalkr dmalkr requested a review from mgajda January 17, 2022 08:55
@mgajda
Copy link

mgajda commented Jan 28, 2022

Can you please add the unit test?

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.

2 participants