forked from SaltwaterC/aws2js
-
Notifications
You must be signed in to change notification settings - Fork 0
XML Parser
SaltwaterC edited this page Nov 16, 2011
·
5 revisions
libxml-to-js was created specifically to support the aws2js library, but it is a general purpose implementation. It simply converts the XML response to an usable JavaScript object.
If the Amazon APIs return a broken XML, then you are going to be notified about this specific issue as aws2js sets the error argument for your callback.
Usually the XML parser is in use by the 'xml' handler of the underlying request making method, makeRequest(). If an error state of the HTTP request is detected, then the XML parser is automatically fired by the aws2js's makeRequest() in order to present you an usable response object.
For more details follow: HTTP Errors, Response Body Handler.