Hi John,

On Jun 12, 2009, at 10:10 AM, John Prystash wrote:

> Hello Everyone, I had a question about the 405 response message  
> returned by Restlet 1.1.1.  When I try a parse the XML response, I  
> get the following:
>
>     [Fatal Error] :8:3: The element type "br" must be terminated by  
> the matching end-tag "</br>".
>
> The entire response:
>
> <html>
> <head>
>   <title>Status page</title>
> </head>
> <body>
> <h3>The method specified in the request is not allowed for the  
> resource identified by the request URI</h3><p>You can get technical  
> details <a 
> href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6 
> ">here</a>.<br>
> Please continue your visit at our <a href="/">home page</a>.
> </p>
> </body>
> </html>
>
> I'm sure I can edit the response before it gets out of my service,  
> but I thought this might be something useful to bring up.
>
> Thanks for any insight.

SAX can't parse it because it's HTML, not XML.  (<br> alone is valid  
HTML.)  You should be able to determine whether it is HTML or XML in  
your client by examining the content type header.  Is restlet not  
setting that header correctly?

If you want to provide XML-formatted error responses, I believe you'll  
have to implement them yourself.

Rhett

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2361683

Reply via email to