Reputation: 277
I'm trying to use XMLReader from XMLReader to apply in my project. But I face to to an issue, that I can't fix this bug. Here is my implementation. I design an architecture for it included processes and task. Each process has individual tasks connect together. Right here is transform task, which receive an GDataXMlDocument from previous task to handle next.
ResponseMessage* response = [super execute:request];
// To do task here
//
GDataXMLDocument *docObject = [[request getMessage:@"documentObject"] messageData];
NSString *content = [[docObject rootElement] XMLString];
NSLog(@"%@", [[docObject rootElement] XMLString]);
NSError *error = nil;
NSDictionary *dictionaryXML = [XMLReader dictionaryForXMLString:[[docObject rootElement] XMLString] error:&error];
And small part of XML object:
<IposDocument xmlns="http://www.csc.com/integral/ipos-common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipos-prospect="http://www.csc.com/integral/ipos-prospect"><Header><DocType/><DocId/><Version/><Validate/><IsValidateSuccess/><ClientDate/></Header><Data><ipos-prospect:Prospect vpms-suffix="Prospect"><ipos-prospect:Person vpms-suffix="Person"><ipos-prospect:FirstName vpms-suffix="FirstName" visible="1" mandatory="1" editable="1" default="" validate="" prefix="prospect.person.firstName."/><ipos-prospect:MiddleName vpms-suffix="MiddleName" visible="1" mandatory="0" editable="1" default="" validate="" prefix="prospect.person.middleName."/>
But XMLReader can't parse this object and always return nil. I don't know why althought debug it a dozen times. Any help is appreciate. Thank you very much.
Upvotes: 0
Views: 144