Posted by Brent Clements on 01/05/05 07:52
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
[Back to original message]
|