note 60677 rejected from function.dom-domdocument-loadxml by nlopess

From: Date: Fri, 13 Jan 2006 16:29:09 +0000
Subject: note 60677 rejected from function.dom-domdocument-loadxml by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-101711@lists.php.net to get a copy of this message
Note Submitter: lihong dot wei at mwbiz dot de ---- Is it a bug in PHP5? For the following incorrect xmldata, I mean, it misses the other tag </isbn>. DOMDocument->schemaValidate() causes "core dump", if you execute it unter commando-line. So, I think, you must use libxml_get_errors() check your xmldata first, than use DOMDocument->schemaValidate() for validate. xmldata: <?xml version="1.0" encoding="UTF-8"?> <books> <book lang="de"> <author>Sebastian Bergmann</author> <title>Professionelle Softwareentwicklung mit PHP 5</title> <isbn>3-89864-229-1 </book> </books> schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="SSN" type="xs:int"/> <xs:element name="company" type="xs:string"/> <xs:element name="employee"> <xs:complexType> <xs:sequence> <xs:element ref="employeename"/> <xs:element ref="employeeaddress"/> <xs:element ref="SSN"/> <xs:element ref="company"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="employeeaddress" type="xs:string"/> <xs:element name="employeename"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="id" type="xs:string" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:schema>

« previous php.notes (#101711) next »