What are some best practices for formatting XML files when using nusoap in PHP?

When working with nusoap in PHP to handle XML files, it is important to ensure that the XML files are properly formatted to avoid any parsing errors. One way to achieve this is by using the `formatOutput` property of the `DOMDocument` class to set the XML output to be formatted with proper indentation and line breaks. This will make the XML files more readable and easier to work with.

// Create a new DOMDocument object
$doc = new DOMDocument();

// Load your XML data into the DOMDocument
$doc->loadXML($your_xml_data);

// Set the formatOutput property to true to format the XML output
$doc->formatOutput = true;

// Save the formatted XML data back into a variable
$formatted_xml = $doc->saveXML();

// Now you can use $formatted_xml for further processing