title: TouchXML - CXMLDocument object failed to initialize
body: <p>I am stuck with some TouchXML code. Please help.</p>
  
  <p>I have the following code to get the data from an xml webservice:</p>
  
  <pre><code>NSData *urlData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
  
  
  NSString *data = [[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding];
  
  NSLog(@"String data: %@ \n", data);
  
  //Do the parsing
  
  CXMLDocument *document = [[[CXMLDocument alloc] initWithData:urlData encoding:NSUTF8StringEncoding options:0 error:&amp;error] autorelease];  
  NSLog (@"Document  :%@ \n",[document stringValue]);
  </code></pre>
  
  <p>The string data does have the content from the service, but how come the CXMLDocument object does not contain anything? Someone can tell me why?</p>
  
  <pre><code>2009-12-30 18:21:59.467 MyAdvancedBlog[3425:207] String data: &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;Post xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"&gt;
    &lt;IdPostazione&gt;42&lt;/IdPostazione&gt;
    &lt;StringID&gt;HOANG&lt;/StringID&gt;
    &lt;Name&gt;CASSA2&lt;/Name&gt;
    &lt;TerminalValid&gt;true&lt;/TerminalValid&gt;
    &lt;NeedSession&gt;false&lt;/NeedSession&gt;
  &lt;/Post&gt;   
  
  2009-12-30 18:21:59.469 MyAdvancedBlog[3425:207] Document  :(null) 
  </code></pre>