I'be been using the Rest API’s and am curious as to how they should behave?

If I have my mws turned off, they seem to return HTML and not an XML response? This means when I try and programmatically parse the XML (using PHP), if the server is off I run into all sorts of problems.

I thought one way around this would be to validate the response from the server to check that its proper XML, so I run the following php code to validate:

//must have the header otherwise response is not recognised as XML

$xdoc = new DomDocument;
$xmlfile = 'https://robdunfey.mymobilesite.net/rest/presence/location';
$xmlschema = 'http://mymobilesite.net/schema/presence/1.1.0/location.xsd';
//Load the xml document in the DOMDocument object
//Validate the XML file against the schema
if ($xdoc->schemaValidate($xmlschema)) {
print "$xmlfile is valid.\n";
} else {
print "$xmlfile is invalid.\n";


With the MWS off it doesn't validate, progress, but...

even when I have the GPS on with a fixed location and accuracy, and web server switched on, the XML response still doesn’t validate, giving the following response:

Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Element 'accuracy': '66.1796417236328' is not a valid value of the local atomic type. in /home/gisconsu/public_html/mws/test.php on line 10
https://robdunfey.mymobilesite.net/r...sence/location is invalid.

I’m just hacking around with PHP and am no authority, but this seems odd behaviour? I would have expected a valid XML response to always be returned from the web request? Just thought I would post for your information.