This demo shows how dynamically retrieved MathM (via Javascript XMLHttpRequest), is made into a DOM node and instered into the DOM tree of this page.
Note that this page is .xhtml and therefore an XML document (type application/xhtml+xml) rather than an HTML document (type text/html). Note the DOCTYPE used as well.
Here is a mixed-mode MathML displayed
To try the demo, enter an infix expresson and click the convert button.
The get request to obtain your conversion is shown below
The result of the converted MathML displayed by Mozilla, Firefox or Netscape with math fonts loaded:
Use view selection source to see the source MathML generated which contains both Presentation code and Content code.
See this javascript file for the dynamic actions.