How to correctly format XML for iOS parsing

trewheria

New Member
I am in the process of writing some code to parse questions into objects. I am using NSXMLParser. The problem is, I also formatted my own XML data, and I think it is incorrect.\[code\]<?xml version="1.0" encoding="UTF-8"?><factor value="http://stackoverflow.com/questions/11303323/1"> <key value="http://stackoverflow.com/questions/11303323/plus"> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> </key> <key value="http://stackoverflow.com/questions/11303323/minus"> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> </key></factor><factor value="http://stackoverflow.com/questions/11303323/2"> <key value="http://stackoverflow.com/questions/11303323/plus"> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> </key> <key value="http://stackoverflow.com/questions/11303323/minus"> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> <question>PLACEHOLDER_TEXT</question> </key></factor>\[/code\]That is the xml im am parsing. Halfway through the questions, the parser gives me \[code\]Error Domain=NSXMLParserErrorDomain Code=5 "The operation couldn
 
Back
Top