Hi Brian,

Is <hooks> the root element of your XML file? If so, then I think it makes sense that /hooks works while //hooks doesn't.


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Sep 12, 2007, at 9:39 AM, Giant Jam Sandwich wrote:


This however does work:

$("/hooks/errors/error",data);

Although they mean two different things, this will be sufficient for
what I am doing. It might still be good to look into though.

Thanks John.


On Sep 11, 4:18 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
What version of jQuery - and if you're using jQuery 1.2, do you have
the XPath plugin included?

--John

On 9/11/07, Giant Jam Sandwich <[EMAIL PROTECTED]> wrote:



$("//hooks/errors/error",data);

If my XML contains an error node, everything is okay. If it does not
contain an error node, I get the following error:

"Error: d[i].getElementsByTagName is not a function"

Shouldn't it just return null?

Thanks.

Brian


Reply via email to