in reply to Re^2: Scrubbing XML
in thread Scrubbing XML
Does the XML file format even care, at all, about newlines?
It depends what you mean.
To XML, newlines and carriage returns do not have special meaning. Stripping them from the document will not affect the validity of the document.
On the other hand, it will change the values of text nodes and attribute nodes. (Upd: Not completely true: See Re^7 ) That may or may not be desirable. The OP indicated he only wanted to remove <CR><LF> pairs and leave lone <LF> behind, which can be done using your technique.
Update: Replaced bad example with better explanation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Scrubbing XML
by Your Mother (Archbishop) on Jun 02, 2011 at 13:15 UTC | |
by ikegami (Patriarch) on Jun 02, 2011 at 15:59 UTC | |
by Your Mother (Archbishop) on Jun 02, 2011 at 16:12 UTC | |
by ikegami (Patriarch) on Jun 02, 2011 at 17:00 UTC | |
by Jenda (Abbot) on Jun 05, 2011 at 00:34 UTC |