[nycphp-talk] Schema Validation
Tim Gales
tgales at tgaconnect.com
Tue May 13 11:28:39 EDT 2008
Ben Sgro wrote:
> Hello,
>
> I'm having a lot of trouble getting the dom object schema validation
> to work. After looking on google, it seems there isn't a straight
> forward way to handle
> complex schemas.
>
> Take the following code:
>
> if (is_file($schemaFile))
> {
> $domObj->load($requestXml);
> if (!$domObj->schemaValidate($schemaFile))
> {
>
>
> load() is throwing a warning:
> <b>Warning</b>: DOMDocument::load() [<a
> href='function.DOMDocument-load'>function.DOMDocument-load</a>]: I/O
> warning : failed to load external entity
This looks to me like its not getting a stream going, or if its local
acccess it might be a file permission problem.
>
> And so is the call to schemaValidate()
> <b>Warning</b>: DOMDocument::schemaValidate() [<a
> href='function.DOMDocument-schemaValidate'>function.DOMDocument-schemaValidate</a>]:
> The document has no document element.
You may not not only not have a document element -- you may not have any
document at all.
--
T. Gales & Associates
'Helping People Connect with Technology'
http://www.tgaconnect.com
More information about the talk
mailing list