JP wrote:
I am trying to figure out how can I read particular content of the page
after I have requested page into XMLHttpRequest object.
Is there a way to parse somehow responseText? In pseudo code I want to
do something like this.
var myHeader = myXMLHttpRequest.document.getElementById("Header") ;
Provided your HTML element has an `id' attribute of type ID and
value "Header", you could do something along
var m = myXMLHttpRequest.responseText.match(
/<[^>]+\s+id\s*=(["']|\s*)Header(["'])(\s+[^>])*>/i);
However, outputting X(HT)ML as application/(xhtml+)xml and using
a parser object or responseXML instead is the sane approach.
PointedEars
--
Those who desire to give up freedom in order to gain security,
will not have, nor do they deserve, either one.
-- Benjamin Franklin