Reputation: 1114
I am working now with racket and XML creation files. To do so, I'm using the function:
(display-to-file
( SOME_XEXPR )
(FILE_PATH)
And the XML looks like one bit mess. No newlines, identation or whitespaces, only one long line. How do I make the output look nicer?
Upvotes: 2
Views: 347
Reputation: 18927
Have a look at the xml module; display-xml
can be of help for example:
(require xml)
(display-xml (read-xml (open-input-string "<a>1<b>2</b></a>")))
yields
<a>
1
<b>
2
</b>
</a>
Upvotes: 3