getting attributes of href using libxml

Posted by iSight on Stack Overflow See other posts from Stack Overflow or by iSight
Published on 2010-05-05T09:00:05Z Indexed on 2010/05/05 9:08 UTC
Read the original article Hit count: 274

Filed under:

Hi,

I have xml file nameed Hello as under with starting node as under:

/Hello xmlns:xsi: = "some text" xmlns:xsd = "some text" version="1.0"/

I tried to get the first and second attributes of node named Hello, using

xmlAttr *attr = nodePtr->properties;//nurrent node is Hello

while ( attr )
{

    NSLog(@"\n Attribute name:%s value:%s",attr->name,attr->children->content);

    attr = attr->next;
};

But, i could not get the first and second attributes, instead it only returns third attribute. How can i get the first and second attributes

© Stack Overflow or respective owner

Related posts about libxml2