Absolutely right! In my .jsp I had something like this:
<jsp:text>
<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
</jsp:text>
I changed it to this (no spaces):
<jsp:text><![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]></
jsp:text>
and I was able to access the element below (showed in the console).
function woa(res) {
alert(res.responseText);
var dom = parseXML(res.responseText);
var $dom = $(dom);
console.log( $dom.find('#iiForm\\:iiDude').attr
('value') );
}
THANK YOU VERY MUCH!!!
On Nov 11, 5:15 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> That sounds like whitespace before the <?xml tag.
>
> I notice in your previous message where you listed the entire response,
> there is a space before the <?xml.
>
> What's the value of res.responseText.indexOf('<')? It should be 0.
>
> > From: John Ruffin
>
> > Michael, I tried your test verbatim as the callback to my
> > $.ajax { complete : yourFunctionNameHere }. Worked like a
> > charm. I saw the expected results in the console.
>
> > However, when switch your xml to be evaluated out for the
> > xhr.responseText - I get an "error" in firebug "XML or text
> > declaration not at start of entity".
>
> > Just to check, I put an alert right before the call to
> > parseXML() and I can see the full xml of the response.
>
> > alert(res.responseText);
> > var dom = parseXML(res.responseText);
>
> > I couldn't tell what caused the hiccup. Any ideas?
>
> > On Nov 11, 4:10 pm, Michael Geary <[EMAIL PROTECTED]> wrote:
> > > You could just run an XML parser on the returned text:
>
> > >http://groups.google.com/group/jquery-en/msg/3b15af17889ee816
>
> > > -Mike
>
> > > > From: John Ruffin
>
> > > > I tried to set the $ajax{ dataType : xml } attribute but the
> > > > response still showed in responseText not responseXML.