Hi,
I'm having trouble getting xpath selectors to work well, particularly
on XML responses from ajax requests, using FF. Hoping somebody can
help. Here are the steps I'm taking:
1. Perform an ajax request using Prototype's Ajax.request, with an
onComplete callback to my function. Here's a sample response:
<?xml version="1.0"?>
<XMLResponse>
<Errors/>
<Warnings/>
<Messages/>
<Response>
<ProductType>
<Id>40</Id>
<Name>Chain</Name>
<ProductGroup>BMX</ProductGroup>
<Margin/>
<Properties>
<PropertyTemplate>
<Sid>44c0ade1561d3</Sid>
<ProductTypeId>40</ProductTypeId>
<PropertyTypeId>34</PropertyTypeId>
<PropertyType/>
<Required>0</Required>
<Name>Weight</Name>
<Type>1</Type>
</PropertyTemplate>
</Properties>
</ProductType>
</Response>
</XMLResponse>
2. In my function, calling jQuery("//ProductType/Properties/
PropertyTemplate") on the responseXML property of the response. I
get zero elements.
3. Replacing the jquery with a css-style selector, works: jQuery
("ProductType Properties PropertyTemplate") returns 1 element.
I'd prefer to use xpath over css. Any thoughts? Thanks!
-jeff
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/