propertydictStack : missing value— stack to hold array of dictionariespropertytextInProgress : ""— string to collect text as it is foundpropertyanError : missing value— if we get an error, store it here

— this is an XML parser delegate method. Called when new element foundonparser:anNSXMLParserdidStartElement:elementNamenamespaceURI:aStringqualifiedName:qNameattributes:aRecordsetparentDicttomydictStack’slastObject()setchildDicttocurrent application’sNSMutableDictionary’s|dictionary|()ifaRecord’s|count|() > 0thenchildDict’ssetValue:aRecordforKey:"attributes"endif

— this is an XML parser delegate method. Called at the end of an elementonparser:anNSXMLParserdidEndElement:elementNamenamespaceURI:aStringqualifiedName:qNameifmytextInProgress’s|length|() > 0thensetdictInProgresstomydictStack’slastObject()dictInProgress’ssetObject:textInProgressforKey:"contents"setmytextInProgresstocurrent application’sNSMutableString’s|string|()endif

— this is an XML parser delegate method. Called when string is found. May be called repeatedlyonparser:anNSXMLParserfoundCharacters:aStringif (aString’sstringByTrimmingCharactersInSet:(current application’sNSCharacterSet’swhitespaceAndNewlineCharacterSet()))’s |length|() > 0then (mytextInProgress)’s appendString:aStringendifendparser:foundCharacters:

— this is an XML parser delegate method. Called when there’s an erroronparser:anNSXMLParserparseErrorOccurred:anNSErrorsetmyanErrortoanNSErrorendparser:parseErrorOccurred: