D
dandiebolt
Using xmlhttp I am accessing a document from the web that is not xml
and is in fact not even proper html even though it is supposed to be
(unbalanced tags). Here is the type of code I am using:
url="http://www.domain.com/page.html";
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.open("GET", url, false);
xmlhttp.send();
var xmlResp = xmlhttp.responseXML;
I want to create an array that holds the contents of every paragraph
<P> tag. The paragraphs are well formed with both opening and closing
tags <P> and </P> but the document as a whole is not valid xml or html.
How can I process the so-called xml response to extract the contents of
each paragraph into a unique element of the array? I would like to use
DOM methods to extract the paragraphs rather than parse up the text
with xmlhttp.responseText. Any help would be appreciated.
and is in fact not even proper html even though it is supposed to be
(unbalanced tags). Here is the type of code I am using:
url="http://www.domain.com/page.html";
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.open("GET", url, false);
xmlhttp.send();
var xmlResp = xmlhttp.responseXML;
I want to create an array that holds the contents of every paragraph
<P> tag. The paragraphs are well formed with both opening and closing
tags <P> and </P> but the document as a whole is not valid xml or html.
How can I process the so-called xml response to extract the contents of
each paragraph into a unique element of the array? I would like to use
DOM methods to extract the paragraphs rather than parse up the text
with xmlhttp.responseText. Any help would be appreciated.