Skip to content

XPath query error #1826

@s-aversa

Description

@s-aversa

When using a XPath expression to find nodes,
the following query
elem1/elem2/param[@value='v2']

doesn't match anything from xml:

<?xml version="1.0" ?>
<elem1>
	<elem2>
		<param name="n1" value="v1"/>
	</elem2>
	<elem2>
		<param name="n2" value="v2"/>
	</elem2>
</elem1>

The method getNodeByPath() returns null instead of returning the
<param> node under the second <elem2> node.

I attached a sample xml and a sample application I made to verify the issue.

sample.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions