I am trying to get specific tags from myxmlfile, and I want those tags to be in an xml format. Here is the code that i have tried so far but am still missing something.
<?php
$xml = simplexml_load_file('MyXmlFile.xml');
$result = $xml->xpath('/Batch/Commands/Command');
while(list( , $node) = each($result)) {
echo $node->asXML('two.xml');
}