Skip to content

NodeSeq attribute search does not work as expected #63

Open
@skalsi-atlassian

Description

@skalsi-atlassian

When using the back-slash operator on a NodeSeq, the behaviour does not match how XPath works. Getting the attribute value works when there's only a single element in the node sequence:

> val x = <x><a b='1'/></x>
> x \ "a" \ "@b"
res2: scala.xml.NodeSeq = 1

but fails when there are more:

> val x = <x><a b='1'/><a b='2'/></x>
> x \ "a" \ "@b"
res3: scala.xml.NodeSeq = NodeSeq()

expected:

res3: Seq(1, 2)

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