This is my XML structure....
<course>
<Topic Name="Child1">
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
</Topic>
<Topic Name="Child2">
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
</Topic>
<Topic Name="Child3">
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
<subtopic Name="Subchild"> </subtopic>
</Topic>
</course>
Right now I'm using these three Delegates
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict
{
}
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
}
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
}
I can get the data inside the node by means of these delegates..... But I don't know how to get the attributes of child and sub childs