The Response XML
Now that you know how to make Ajax calls using the Taconite jQuery plugin you can focus on building the XML response! Like always, the heart of Taconite is an XML document retured by the server that tells the Taconite parser how to update the DOM.
The first thing to remember regarding the server's XML response: The server response must always have a content type of text/xml.
Past that, these are the simple rules you'll need to remember for the XML response:
- The response XML must always have a root taconite-root node.
- The taconite-root node can have any number of action nodes. An action node tells the Taconite parser to perform a certain DOM manipulation.
- Each action node has a "selector" attribute whose value is a jQuery selector string identifying the context node of for the action. Note that the Taconite jQuery plugin also accepts the contextNodeID attribute like the classic TaconiteParser does, for backwards compatibility.
- Each action node has a single child: a CDATA section that encapsulates XHTML (or HTML) data that is rendered by that Taconite parser, on the DOM element(s) specified by the "selector" attribute.