Mapping XML Data to Entity Attributes
The data import engine that CoreDataImporter
provides can now be leveraged by the parse
results of an NSXMLParser
. All that’s left to do is implement the appropriate delegate methods defined by the NSXMLParserDelegate
protocol. There are two methods to be implemented in a new DELEGATE: NSXMLParser
section:
A parseErrorOccurred method will be used to log any errors that occur during the XML parse, usually from the NSXMLParserErrorDomain
. If you receive errors, they’ll probably be due to a formatting error or invalid character in the XML file.
A didStartElement method will be called every time the parser finds ...
Get Learning Core Data for iOS: A Hands-On Guide to Building Core Data Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.