On Sun, Dec 6, 2009 at 3:02 PM, S. Ross <cwdi...@gmail.com> wrote: > Yes, well I did read the documentation but thanks for the suggestion. I just > mistyped in my email. I'm also specifying the Cocoa framework. > > None of that seems to explain why initWithData:error returns null.
In the original code you showed, you were passing an NSMutableString object to initWithData:options:error:. If you want to use initWithData:options:error: you need to convert your string to a data object: xml_data = s.dataUsingEncoding(NSUTF8StringEncoding) Or, if the source data is coming from some other source, you might be able to create an NSData object directly. > I'll give it another whirl. > > Hunted and pecked from my iPhone > > On Dec 6, 2009, at 2:27 PM, Vincent Isambart <vincent.isamb...@gmail.com> > wrote: > >>> * initWithString is simply unrecognized as a method >> >> Please look at the documentation first. It's initWithXMLString not >> initWithString >>> >>> * NSXMLDocumentTidyXML constant is not defined so I just transcribed the >>> equivalent bitshift >> >> If you do framework 'Cocoa', NSXMLDocumentTidyXML is properly defined... >>> >>> * The resultant XML document is null >> >> It works fine if you use initWithXMLString:options:error: >> _______________________________________________ >> MacRuby-devel mailing list >> MacRuby-devel@lists.macosforge.org >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > _______________________________________________ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel