Results 1 to 4 of 4
Discuss NSXMLDocument == nil? at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; does anyone have any clue why I'm getting a nil NSXMLDocument based upon the snipped ...
  1. #1
    Newbie Array

    Join Date
    Mar 2008
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default NSXMLDocument == nil?

    does anyone have any clue why I'm getting a nil NSXMLDocument based upon the snipped and output below....?

    NOTE: 1.1.3 firmware

    NSError errmsg2 = nil;
    NSString *test_string = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><item><session_key>123123</session_key></item>"];
    AlexLog(@"TEST XML: %@", test_string);
    NSXMLDocument *xmlDoc2 = [[NSClassFromString(@"NSXMLDocument") alloc] initWithXMLString:test_string options:NSXMLDocumentXMLKind error:&errmsg2];

    if (xmlDoc2 == nil) {
    AlexLog(@"xmlDoc2 is nil");
    }
    if (errmsg2 == nil) {
    AlexLog(@"errmsg2 is nil2");
    }
    NSArray * children2 = [xmlDoc2 children];
    AlexLog(@"children2 count: %i", [children2 count]);
    /*
    OUTPUT:
    TEST XML: <?xml version="1.0" encoding="ISO-8859-1"?><item><session_key>123123</session_key></item>
    xmlDoc2 is nil
    errmsg2 is nil2
    children2 count: 0

    */
    Last edited by reallylongaddress; 03-20-2008 at 10:47 PM.



  2. #2
    Newbie Array

    Join Date
    Mar 2008
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    IIRC, NSXMLDocument is avail in SDK only. For the open toolchain, you'll need to go to a lower level.

    There was a recent check in of the 'iphone-dev' project. I think they updated the API headers to support building Aspen projects with the toolchain. Perhaps this may help you as well.

  3. #3
    Newbie Array

    Join Date
    Mar 2008
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    According to erica's docs (http://ericasadun.com/iPhoneDocs112/..._document.html) and much sample code I've sen.....NSXMLDocument is in the 1.1.2 release...unless it's not *really* there (stubbed out and empty).

    dominic

  4. #4
    Newbie Array

    Join Date
    Mar 2008
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I check on iphonedevdocs.com for reference for NSXMLDocument (cause I need it too ) but was unable to find anything.

    I rebuilt the toolchain to incorporate the latest revision changes. Let me dig through those directories and see if I can find at least a header file or something for NSXMLDocument when I get home later.

    Out of curosity, does the NSXMLDocument code work under the SDK environment?

 

 

Similar Threads

  1. [NSXMLDocument] Need some information
    By kabhong in forum iPhone Developer Exchange
    Replies: 1
    Last Post: 05-22-2008, 01:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 07:05 AM.
twitter, follow us!