Steffen Märcker wrote:
> Hi,
>
> how can xml be written using "pretty print"?
>
The standard #printString of XML.Node returns a formatted string:
dom := XMLParser
processDocumentInFilename: 'c:\Projects\repositories.xml'
beforeScanDo: [:parser | parser validate: false].
dom printOn: Transcript
If you want to do more fancy things you can build your own SAX driver to
generate pretty output from xml being parsed, for an example see
Tools.FileTools.XMLSourceViewer>>parseXMLFrom:writingTo:
Another natural thing to do would be to create a Visitor that walks the
dom nodes and pretty prints them, see #saxDo: & #nodeDo: on the Node
hierarchy for not-quite-Visitor support.
Enjoy,
R
-
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc