You can easily use browser based XSL transformation routines to convert an XML string into an XMLDocument or HTML output that can then be applied into any page element.
The steps could be briefly summarized as:
- Load an XML string from a resource (or as the result of an AJAX hit).
- Load the XML document into an Xml document object (code differs for Browsers - IE uses the ActiveXObject MSXML - DOMDocument, while Mozilla uses the built-in
implementation
to create a Document. Chrome on the other hand uses the built-in XmlHttpRequest
object as the only available XML document object.)
- Load the XSL document similarly and set its arguments.
- Transform the XML and obtain output as a string.
- Apply the string output to any page element.
Note that the code differs for each browser so it may be simpler to use a public JS framework such as JQuery or Prototype.