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

scala.xml.Attribute remove(String, NamespaceBinding, String) method removes all unprefixed attributes unintentionally #5843

scabug opened this issue May 27, 2012 · 2 comments


Copy link

@scabug scabug commented May 27, 2012


  1. call remove(String, NamespaceBinding, String) overload on attributes.
$ scala
Welcome to Scala version 2.10.0-M3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_31).
Type in expressions to have them evaluated.
Type :help for more information.

scala> <test foo="1" bar="2" />.attributes remove (null, scala.xml.TopScope, "foo")
res0: scala.xml.MetaData = 

scala> <test foo="1" bar="2" />.attributes remove "foo" // this works!
res1: scala.xml.MetaData =  bar="2"


{code}remove (null, scala.xml.TopScope, "foo") {code} removes both foo and bar. It in fact removes all unprefixed attributes.


{code}remove (null, scala.xml.TopScope, "foo") {code} removes only foo and returns {code}bar="2"{code}.


This comment has been minimized.

Copy link

@scabug scabug commented May 27, 2012

Imported From:
Reporter: Eugene Yokota (eed3si9n)


This comment has been minimized.

Copy link

@scabug scabug commented May 28, 2012

@lrytz said:

@scabug scabug closed this Jun 5, 2012
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.