Hi guys,

I have a script that reads the contents of an XML file.
The contents of one of the tags of the XML file contains XHTML(made up of <p> and <a> tags).

The code I have to output the content of the XML is as follows:
Code:
xmlRoot = xmlResponse.documentElement;

var wrapper        = document.getElementById("myDiv");
var bodyText     = xmlRoot.getElementsByTagName("bodyText");

for(var i=0; i<bodyText.length; i++)
{
    var para         = document.createElement("p");
    var bodyContent = document.createTextNode(bodyText[i].firstChild.data);
    
    para.appendChild(bodyContent);
    wrapper.appendChild(para);    
    ...
}
Now, when I view the page in my browser, I get paragraphs that actually display the HTML code.

Is there a way to parse this HTML so that it actually appears with all the links etc, as opposed to just showing the code?

Does this make sense?

D