XML File validation using PHP????
| From: | Brent Clements | Date: | Wed, 05 Jan 2005 05:52:36 +0000 |
| Subject: | XML File validation using PHP???? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-205649@lists.php.net to get a copy of this message | ||
We are running PHP 4.3.2
Is there a class out there that can validate an xml file against a schema?
I know in PHP 5+ that the dom package includes simple validation
function, but until we upgrade, that's not an option.
Can anybody point me in the write direction?
I want something simple to where I can:
<?php
include "xmlvalidator.class.php";
$xmlvalidator = new xmlvalidator();
$xmlvalidator->xmlfile('/foolocation/foo.xml');
$xmlvalidator->schemafile('/foolocation/foo.xsd');
echo $xmlvalidator->validate();
?>
If there is someting out there similiar that'd be great, if not can
someone please explain to me the basics of validating xml against a
schema file?
Thanks,
Brent