Skip to content

[CHANGES] remove the duplicate element when the query node-set has duplicate element #94

@zhengchun

Description

@zhengchun

If you use a ancestor:: *, parent:: * and ancestor-or-self: : * or ../ expression, the returned node set may contain duplicate nodes, especially in the following example:

<a>
  <bb>
    <bbb>1</bbb>
    <bbb>2</bbb>
    <ccc>3</ccc>
  </bb>
</a>

if you are executing the xpath: //bbb/../ccc, you will get the duplicate nodes:

<ccc>3</ccc>
<ccc>3</ccc>

or //bbb/parent::*, you will get:

<bb><bbb>1</bbb><bbb>2</bbb>...</bb>
<bb><bbb>1</bbb><bbb>2</bbb>...</bb>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions