How can you create an XML tree in PHP without additional installations?
To create an XML tree in PHP without additional installations, you can use the built-in SimpleXMLElement class. This class allows you to easily create and manipulate XML structures without the need for any additional libraries or extensions.
// Create a new SimpleXMLElement object to represent the root of the XML tree
$xml = new SimpleXMLElement('<root></root>');
// Add child elements to the root
$xml->addChild('child1', 'value1');
$xml->addChild('child2', 'value2');
// Output the XML tree as a string
echo $xml->asXML();