I suspect it's the dance you're having to do. Quickly testing in a
browser, If you use

xmlObjectTree = $(data)

then you can iterate through the animal tags.
Doing the dance in a browser yields an unrecognized expression syntax
exception. How did you come to use $($(data).text()); and what happens
if you use the other method?

On Feb 19, 8:29 pm, "s.ross" <cwdi...@gmail.com> wrote:
> I'm trying to get Adobe(TM)(R) AIR to work with jQuery kinda friendly-
> like. I'm sending off an xml-rpc request as follows:
>
>                                 this.packageRequest = function(method, 
> secure, params, callback) {
>                                         var msg = new XMLRPCMessage(method);
>                                         msg.addParameter(params);
>
>                                         urn = (secure) ? this.SecureUrn : 
> this.Urn;
>                                         urn += this.istockEndPoint;
>                                         $.ajax({
>                                                 url: urn,
>                                                 data: msg.xml(),
>                                                 dataType: 'xml',
>                                                 type: 'POST',
>                                                 contentType: 'text/xml',
>                                                 success: callback
>                                         });
>                                 }
>
> All well and good, and for simple response groups, this works great.
> The callback function is invoked and the xml sanitized. I'm not
> certain why, but I have to do this dance in the callback:
>
> function myFineCallback(data) {
>   xmlObjectTree = $($(data).text());
>
> }
>
> The problem I'm really bumping up against is the case where the XML
> looks like:
>
> <root>
>   <animals>
>     <category name="reptiles" />
>     <category name="mammals" />
>     <category name="marsupials" />
>   </animals>
> </root>
>
> You get the picture. The tags have no content. One would expect that:
>
> xmlObjectTree.find('animals category').each( ... )
>
> would iterate the animals tags, allowing me to pull the name attribute
> out, but I'm getting a zero-length result. Same for xmlObjectTree.find
> ('category').
>
> Any thoughts>

Reply via email to