iOS Developer Question:

Explain me how to parse xml?

Tweet Share WhatsApp

Answer:

Using NSXMLParser.
Create xml parser object with xml data, set its delegate , and call the parse method with parserObject.
Delegate methods getting called :
☛ – parserDidStartDocument:
☛ – parserDidEndDocument:
☛ – parser:didStartElement:namespaceURI:qualifiedName:attributes:
☛ – parser:didEndElement:namespaceURI:qualifiedName:
☛ – parser:didStartMappingPrefix:toURI:
☛ – parser:didEndMappingPrefix:
☛ – parser:resolveExternalEntityName:systemID:
☛ – parser:parseErrorOccurred:
☛ – parser:validationErrorOccurred:
☛ – parser:foundCharacters:
☛ – parser:foundIgnorableWhitespace:
☛ – parser:foundProcessingInstructionWithTarget:data:
☛ – parser:foundComment:
☛ – parser:foundCDATA:

Download iOS Developer PDF Read All 102 iOS Developer Questions
Previous QuestionNext Question
Explain me what is "Delegate"?How to start a thread?