fruminovator
09-14-2008, 02:37 PM
I get back an xml doc which contains HTML info that I want to retrieve with all of its tags. But my "content" gets a null value. If content doesn't contain html tags then it works fine.
Here is the code:
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
var xmlDoc=xmlHttp.responseXML.documentElement;
document.getElementById("title").value=
xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
document.getElementById("subtitle").value=
xmlDoc.getElementsByTagName("subtitle")[0].childNodes[0].nodeValue;
// update content editor
var editor = FCKeditorAPI.GetInstance('myFCKeditor');
var content = xmlDoc.getElementsByTagName("content")[0].childNodes[0].nodeValue;
editor.SetHTML(content);
}
Here is the xml:
<page>
<title>About the Mishna program</title>
<subtitle>Mishna program</subtitle>
<content>
<p>
The Mishna Program is a must for anyone serious in developing a strong bekius in mishnaios which is critical to learning gemara.
</p>
</content>
</page>
Thanks for any help.
Here is the code:
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
var xmlDoc=xmlHttp.responseXML.documentElement;
document.getElementById("title").value=
xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
document.getElementById("subtitle").value=
xmlDoc.getElementsByTagName("subtitle")[0].childNodes[0].nodeValue;
// update content editor
var editor = FCKeditorAPI.GetInstance('myFCKeditor');
var content = xmlDoc.getElementsByTagName("content")[0].childNodes[0].nodeValue;
editor.SetHTML(content);
}
Here is the xml:
<page>
<title>About the Mishna program</title>
<subtitle>Mishna program</subtitle>
<content>
<p>
The Mishna Program is a must for anyone serious in developing a strong bekius in mishnaios which is critical to learning gemara.
</p>
</content>
</page>
Thanks for any help.