Re: [Pharo-users] XML Writer not pretty printing

2018-08-15 Thread Peter Uhnak
Thanks! #removeAllFormattingNodes did the trick. Perhaps #prettyPrinted / #enablePrettyPrinting should call it by default? WIth regards, Peter On Tue, Aug 14, 2018 at 10:27 PM Carlo wrote: > Hi Peter > > It seems that #preservesIgnorableWhitespace: is only adhered to "...When > validation is e

Re: [Pharo-users] XML Writer not pretty printing

2018-08-14 Thread Carlo
Hi Peter It seems that #preservesIgnorableWhitespace: is only adhered to "...When validation is enabled and a DTD with element declarations is present..." (See comment in SAX2ContentHandler>>ignorableWhitespace:) The actual parsing code is in SAXParserDriver>>handleWhitespace: What you could d

[Pharo-users] XML Writer not pretty printing

2018-08-14 Thread Peter Uhnak
Hi, I am trying to output a pretty printed document, but it seems that the configuration is being ignored doc := ' ' parseXML. String << [ :stream | doc printOn: stream beforeWritingDo: [ :writer | writer enablePrettyPrinting; enablePlatformSpecificLineBreak. writer formatter indentStri