Skip to content

Does this library support customize function for xpath? #144

@zmjack

Description

@zmjack

Does this library support customize function for xpath?

For example, there is a html string:

<div id="info"></div>
<div id="category_1"></div>
<div id="category_2"></div>
<div id="output"></div>

I want to find out all <div> which is start with category. In this case, they are category_1 and category_2.

Therefore, I need to customize a function that is defined as match in the namespace fn. So that I can do this work with the following xpath expressions:

//div[fn:match(@id, 'category_\d+')]

But it not seem to be supported in the current version. If so, I think I need to create a pull request to support for this feature.

Looking forward to your reply.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions