Using 2.9.0.1
<b time={None}>Hello</b>
=>
<b >Hello</b>
i.e. there is a space after the b in the starting tag.
This makes no sense from an XML perspective.
Is this “feature” supposed to happen?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It happens because of toString implementation of scala.xml.Elem, to be more specific
in object scala.xml.MetaInf method buildString which looks like following:
So it’s firstly adds a white space to string representation of element, and only after that appends next attribute, so if an attribute is present as class member but doesn’t have any string representation you’ll end up with one extra space before closing bracket