How can I read the first and only comment in PHP:
<?xml version="1.0" encoding="UTF-8"?>
<!-- read this -->
<root>
</root>
using DOMDOcument object?
$xml = new DOMDocument();
$libxml_error = 'Il file %s non risulta ben formato (%s).';
// Per evitare i warning nel caso di xml non ben formato occorre sopprimere
// gli errori
if (!@$xml -> load($xml_file_path)) $error = sprintf($libxml_error,
$xml_file_path, libxml_get_last_error()->message);
// Read the fist comment in xml file
How to get the comments from XML file - look for instructions here:
How to retrieve comments from within an XML Document in PHP
What about this:
Since you probably only want the first one:
Source: How to retrieve comments from within an XML Document in PHP