tags:

views:

21

answers:

1

I am doing xml parser on iphone.

example xml is

<root>
 <child att="attributename">
</child>
</root>

another xml is

<root>
<child att="attributename" />
</root>

i am using this method for end element.

- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
  namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{
    if ([elementName isEqualToString:@"root"]) {
        return;
    }

if ([elementName isEqualToString:@""]){
}
}

in second if condition what value i need to pass.... child or any another string....

because end xml tag not </child> .....

Please help me out...

Thanks in advance

A: 

If I understand your question correctly:

The element name will still be "child" as that is the element that is ending. It doesn't matter how the end of the element is specified in the XML.

Robot K
Okay... Thanks Robot.K
kiran kumar