note 60677 added to function.dom-domdocument-loadxml

From: Date: Fri, 13 Jan 2006 16:23:20 +0000
Subject: note 60677 added to function.dom-domdocument-loadxml
Groups: php.notes 
Request: Send a blank email to php-notes+get-101710@lists.php.net to get a copy of this message
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> ---- Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-loadxml.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60677 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60677&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60677&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60677&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60677&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60677&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60677&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60677&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60677&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#101710) next »