It seems to have methods for doing so, but believe me, they just don't work.
You'll end up doing crazy stuff like this:
$xml2 = self::sortArticlesByFileNames($xml);
$xml = simplexml_load_string($xml2->asXML());
And then, of course, you have to return $xml, so if you are already returning something else, you'll end up with
list($xml, $whatever) = doStuff($xml);
for every single function that will change the xml.
Blargh.
In fact, probably, it's better to simply refuse to use SimpleXmlElement at all. It stinks.
Just. Don't. Do it.
You have been warned.
Keine Kommentare:
Kommentar veröffentlichen