PHP ate my XML"s whitespace! I want it back!
am 08.04.2008 07:42:28 von ReGenesis0Oh, how I love SimpleXML. Lovelovelove.
It's not powerful, but it put about 70% of the XML pie within
easy reach of my questing, clublike fingers. And it's got DOM...
interoperability, or something (probably not the right term) for when
I need to do more!
One thing I'm not so fond of is... PHP eats my whitespace. I
have a nice, human-readable list;
I load this list into an XML node, make some changes, and output it
back to XML again! Only now it usually looks thusly;
headlike>
hatlike>
T. Frog
The parser may not care, but I care! I want my whitespace back darn
it! I want to be able to read the results of a XML node I transform!
There was no joyful simple way of doing this when I last checked,
uh... 12-18 months ago. Has one emerged, in the interim?
(Many years ago, when I used macs extensively, i have a nifty
drag-and-drop program called 'the ugly stick' I could drop PC .txt
files on. It made them readable by fixing all the carriage-return
nonsense and turning a swarm of uneven line breaks into neat paragraph
blocks. This is what I seek- an Ugly Stick with which to beat
outputted XML into something I can use without a script mediating for
me.)
-Derik