Hi,
With an indent of 0 there is no formatting at all. The XML is just output on to a single line. There are no new lines added with the indent of zero. For example, your XML will look like this.
<root><child><grandchild>text</grandchild></child></root>
The indent of 0 is a special format, for no new lines or spaces at all. Give it a try, everything will be on a single line.
Niall
--- On Sat, 1/17/09, Lardy <na...@he...> wrote:
> From: Lardy <na...@he...>
> Subject: [Simple-support] How to disable pretty formatting?
> To: sim...@li...
> Date: Saturday, January 17, 2009, 4:25 PM
> I don't need readable XML - in fact it is a hindrance
> since I am sending
> large amounts of it over a network and all those spaces and
> new lines just
> add to the bulk - and so I need to stop simpleXML inserting
> spaces and new
> lines. I can't find anything on Style, Format, etc.
> that allows this. How
> would I go about it? I see I can set the indent to 0 but I
> need to stop the
> new lines being output too as I write each XML on a single
> line for easy
> reading at the other end.
>
> Nice library BTW - up and running in a few minutes.
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/How-to-disable-pretty-formatting--tp21522727p21522727.html
> Sent from the Simple XML Serialization mailing list archive
> at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|