XML file validation
<?php $xml = "<para>some character data</para>"; $parser = xml_parser_create (); if (xml_parse ($parser, $xml, true)) print ("Your XML document is well-formed."); else print ("Your XML document is not well-formed."); xml_parser_free ($parser); ?>