samir
samir

Reputation: 4551

GDataXml and namespaces

I am using GDataXML to parse may XML, but i have a probleme with this :

<....
                       <images xmlns:a="http://.../Arrays">
                           <a:string>http://images...233/Detail.jpg</a:string>
                           <a:string>http://images....233/Detail2.jpg</a:string>
                       </images>
                   .../>

i would like to have all the URL of my images and put it in an NSArray,i am doing like this :

NSError *error = nil;
    GDataXMLDocument *xmlResult = [[GDataXMLDocument alloc] initWithData:data options:0 error:&error];
    if (error) {
        NSLog(@"%@",error);
    }


.......

NSArray *array = [... nodesForXPath:@"images" namespaces:a error:&error];

my array it's not null

Now i would like to access my url of images but i can not, i am doing like this:

arrar = [array elementsForName:@"a"];

byt my array is null, i think that the problemm is with namespaces wut i don't konw how to resolve it Thanks for your answer

Upvotes: 0

Views: 849

Answers (1)

yoninja
yoninja

Reputation: 1962

I think this question is related to this: parse xml with namespaces with gdata xml. Checkout my answer. Hope it helps! :)

Upvotes: 1

Related Questions