I need to use an XSD schema to develop a Web Service that receive reservations from an Hotel. I've the url of the xsd. This is the OTA_HotelResNotifRQ.
I don't know how to begin with this. Someone can help me?
Thanks
I need to use an XSD schema to develop a Web Service that receive reservations from an Hotel. I've the url of the xsd. This is the OTA_HotelResNotifRQ.
I don't know how to begin with this. Someone can help me?
Thanks
The PHP DOM extension, which is available almost all the time can do this natively.
$dom = new DomDocument;
$dom->loadXML($contentOfResponse);
if ($dom->schemaValidate('path/to/schema.xsd')) {
// Valid response from service
} else {
// Invalid response
}
Of course, you can also load the document to validate from a file.
Documentation: http://ca.php.net/manual/en/domdocument.schemavalidate.php