[PHP] Need help for DOM xsd validation
Hi, I'm trying to load XML data into my script. That's no problem. The problem is, that the schema validation fails all time after loading a new document: Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: Element '{http://www.desktopportal.de/Preferences}user': This element is not expected. Expected is ( user ). Funny is, if I'm creating and adding elements with php (DOMDocument etc.) and then validate the xml structure, no error occures. But if I reload this saved file next time when the script is reloading, I get a warning. Any ideas? Thanks, Matthias This is my xml file: http://www.desktopportal.de/Preferences"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> This is my xsd file: http://www.desktopportal.de/Preferences"; xmlns="http://www.desktopportal.de/Preferences"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> maxOccurs="unbounded"/> minOccurs="1"/> maxOccurs="unbounded"/> maxOccurs="unbounded"/> maxOccurs="1"/> use="required"> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help for DOM xsd validation
Hi, I'm trying to load XML data into my script. That's no problem. The problem is, that the schema validation fails all time after loading a new document: Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: Element '{http://www.desktopportal.de/Preferences}user': This element is not expected. Expected is ( user ). Funny is, if I'm creating and adding elements with php (DOMDocument etc.) and then validate the xml structure, no error occures. But if I reload this saved file next time when the script is reloading, I get a warning. Any ideas? Thanks, Matthias This is my xml file: http://www.desktopportal.de/Preferences"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> This is my xsd file: http://www.desktopportal.de/Preferences"; xmlns="http://www.desktopportal.de/Preferences"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> minOccurs="0" maxOccurs="unbounded"/> maxOccurs="1" minOccurs="1"/> use="required"> minOccurs="0" maxOccurs="unbounded"/> minOccurs="1" maxOccurs="unbounded"/> use="required"> minOccurs="1" maxOccurs="1"/> use="required"> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php