foundation.form.response.parser: foundation.sling ================================================= ``foundation.sling`` is a response parser of :doc:`../../index`. It is designed to parse `Sling's HTMLResponse.class `_. Matching Condition ------------------ selector ``*`` contentType ``/text\/html/`` content The response HTML MUST have an element with `#Status` selector. Parsed Data ----------- It returns a JS object which properties are based on the elements having ``id`` attribute. The value of ``id`` attribute is used as the key of the property, while the value of the element is used as the value of the property. Example ------- Given the response HTML: .. code-block:: html
200
Site created
/content/geometrixx5
/content/geometrixx5
The parsed data is the following object: .. code-block:: js var parsedData = { Status: "200", Message: "Site created", Location: "/content/geometrixx5", Path: "/content/geometrixx5" };