Skip to content

Support for XPath2.0 features ends-with/matches #130

@rbkumar88

Description

@rbkumar88

Hi,

Does xmlunit-matchers not support XPATH2.0. PFB code and exception stack trace.
Code:

 private static final String EXAMPLE_XML1 = "<stuff>\n"
            + "	<thing>hat</thing>\n" + "	<thing>cat</thing>\n"
            + "	<thing>car</thing>\n" + "</stuff>";

assertThat(EXAMPLE_XML1,
                hasXPath("count(//thing[ends-with(., 'at')])", equalTo("3")));

Error

org.xmlunit.XMLUnitException: javax.xml.transform.TransformerException: Could not find function: ends-with

Thanks
Bharath

Metadata

Metadata

Assignees

No one assigned

    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