[Console] simplified asXml() method

This commit is contained in:
Fabien Potencier 2010-06-03 09:25:51 +02:00
parent 227653fd24
commit 626b88c8f1
1 changed files with 1 additions and 4 deletions

View File

@ -633,10 +633,7 @@ class Application
$commandXML->appendChild($dom->createTextNode($command->getName()));
}
$commandXML = new \DOMDocument('1.0', 'UTF-8');
$commandXML->formatOutput = true;
$commandXML->loadXML($command->asXml());
$node = $commandXML->getElementsByTagName('command')->item(0);
$node = $command->asXml(true)->getElementsByTagName('command')->item(0);
$node = $dom->importNode($node, true);
$commandsXML->appendChild($node);