You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala.xml.PrettyPrinter seems to change the values of attributes in some instances, by replacing repeated white space. Not always, though.
Notice in the example below how
<babbaorth="B A"/>
turns into
<babbaorth="B A"></babba>
after PrettyPrinting:
Welcome to Scala version 2.8.0.Beta1-prerelease (JavaHotSpot(TM) ClientVM, Java1.6.0_16).
Type in expressions to have them evaluated.
Type:help for more information.
scala> <abbaorth="A B"><babbaorth="B A"/></abba>
res0: scala.xml.Elem= <abbaorth="A B"><babbaorth="B A"></babba></abba>
scala>new xml.PrettyPrinter(200, 2)
res1: scala.xml.PrettyPrinter= scala.xml.PrettyPrinter@1886a34
scala> res1.format(res0)
res2:String=
<abbaorth="A B">
<babbaorth="B A"></babba>
</abba>
Crazy width and indentation nukes the multiple whitespaces in the attributes of both nodes:
We ran into this problem when checking whether some XML attributes were identical to the original input.
I guess you should be able to trust Pretty Mr Printer not to change the values of any attributes?
Since I'm far from an expert in XML, I might be wrong about what is the correct way of treating whitespace inside attribute values. Sorry if this already works according to the XML specs.
Kind regards,
/nikolaj lindberg
The text was updated successfully, but these errors were encountered:
scala.xml.PrettyPrinter
seems to change the values of attributes in some instances, by replacing repeated white space. Not always, though.Notice in the example below how
turns into
after
PrettyPrinting
:Crazy width and indentation nukes the multiple whitespaces in the attributes of both nodes:
We ran into this problem when checking whether some XML attributes were identical to the original input.
I guess you should be able to trust
Pretty Mr Printer
not to change the values of any attributes?Since I'm far from an expert in XML, I might be wrong about what is the correct way of treating whitespace inside attribute values. Sorry if this already works according to the XML specs.
Kind regards,
/nikolaj lindberg
The text was updated successfully, but these errors were encountered: