Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeSeq attribute search does not work as expected #63

Open
skalsi-atlassian opened this issue Jul 20, 2015 · 3 comments
Open

NodeSeq attribute search does not work as expected #63

skalsi-atlassian opened this issue Jul 20, 2015 · 3 comments

Comments

@skalsi-atlassian
Copy link

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)
@skalsi-atlassian
Copy link
Author

Copy-paste from https://issues.scala-lang.org/browse/SI-9047

@SethTisue
Copy link
Member

PR at #43

@biswanaths
Copy link
Contributor

Thanks @skalsi-atlassian for reporting this. As mentioned by @SethTisue there is a PR ready to go. Also please do have a look at PR, if you can spare any amount of time.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants