- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Problem with XML PrettyPrinter and Node toString in general
Thu, 2009-01-22, 20:00
He Ronald,
On Nov 13, 2008, at 7:55 PM, Ronald Steinhau wrote:
> A node is converted to by both toString and the
> PrettyPrinter. I think this is wrong and in an eclipse plugin.xml
> file it may even cause trouble (an extension point is sometimes not
> recognized when not using the short form - although I think this
> should be seen as an eclipse bug).Anyway, for the PrettyPrinter I
> changed line 175-177 (final 2.7.2 sources) to
> if (childrenAreLeaves(node) && fits(test)) {
> makeBox(ind, leafTag(node))
> } else {
> and than it worked for me. If the resp. committer thinks this is
> correct, I hope it will find its way into the source. And even
> better, toString should be corrected in the same manner.
>
> Ronald Steinhau
I incorporated your change, namespace declarations are lost, though.
For example:
var xml = ()
println(new MyPrettyPrinter(220,2).format(xml))
The output is
Do you have any suggestions?
Cheers,
--
Normen Müller