How to parse XML responses
The points that follow describe specifics regarding the parsing of XML in call response output.
- Escape Encoding Usage: Any valid escape encoding from the XML Specification (http://www.w3.org/TR/REC-xml/) may be used in an XML response, For example, "<" might be encoded as "<", "<", or "<").
- “_base64” Attributes: If any attribute value cannot be encoded into the requested encoding within the constraints of the XML Specification, the attribute will be replaced by a different attribute with a "_base64" suffix, and the value will then be base64-encoded into that attribute value.
- Encoding Formats Supported - The
statcalls allow the request to specify an encoding format for the XML response body:
- iso-8859-1 (Default): All filenames, symlink targets, etc., are sent in the XML response byte-for-byte as they exist in NetStorage.
- utf-8: All filenames, symlink targets, etc., are sent in the XML response byte-for-byte as they exist in NetStorage, but only if they are legal utf-8-encoded strings to ensure the result is valid XML.
- Other Supported Formats: While other formats may be supported for use, iso-8859-1 or utf-8 are the recommended types. Please contact your Account Representative or Akamai Technical Support before using any non-listed Encoding Type. You must ensure that your selected encoding is fully compatible with the system and is maintained in all future updates.
- Handling Unexpected XML Tags: Unexpected XML tags and attributes must be ignored in case new attributes are added in a future revision of the NetStorage Usage API.