PHP: Validar XML usando DTD

Cuando necesiten validar un xml utilizando su dtd pueden utilizar el siguiente código (PHP5)


Load('book.xml');
if ($dom->validate()) {
echo "This document is valid!\n";
}
?>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.