Re: PHP ate my XML's whitespace! I want it back!
- From: Michael Fesser <netizen@xxxxxx>
- Date: Tue, 08 Apr 2008 15:49:11 +0200
..oO(Derik)
I load this list into an XML node, make some changes, and output it
back to XML again! Only now it usually looks thusly;
<hatlike_things><thing><hatlike>Canada</hatlike><headlike>Canada</
headlike></thing><thing><hatlike>Thermosphere</
hatlike><headlike>Mesosphere</headlike></thing><thing><hatlike>Kermit
T. Frog</hatlike><headlike>Hand</headlike></thing></hatlike_things>
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?
See the UCNs on
http://www.php.net/manual/en/function.simplexml-element-asXML.php
In short: Use the DOM extension to get more control over the output
formatting.
Micha
.
- References:
- PHP ate my XML's whitespace! I want it back!
- From: Derik
- PHP ate my XML's whitespace! I want it back!
- Prev by Date: include as string
- Next by Date: Re: Help
- Previous by thread: PHP ate my XML's whitespace! I want it back!
- Next by thread: Skagen Square Watches Replica - Skagen Watches Cheap
- Index(es):
Relevant Pages
|