Closed
Description
Running the following invalid attribute search, properly throws an IllegalArgumentException
.
scala> <x/> \ "@"
java.lang.IllegalArgumentException: @
An empty attribute doesn't exist, so it rightly should be a failure.
However, when the improper matching value is used against more than just one element, no error is thrown, just an empty NodeSeq
is returned:
scala> <x><y/><z/></x>.child \ "@"
res1: scala.xml.NodeSeq = NodeSeq()
This was identified while writing ScalaCheck property tests in #110.