On Thu, Oct 1, 2009 at 6:17 PM, jon <trambl...@mac.com> wrote: > DOMDocument *myDOMDocument = [[offScreeneBayWebView mainFrame] > DOMDocument]; > DOMNodeList *allTableNodes = [myDOMDocument > getElementsByTagName:@"table"]; > NSUInteger thelength1 = [allTableNodes length]; > > DOMNode *node; > DOMNode *att; > NSString *attValue; > DOMNamedNodeMap *attributes; > > for (i = 0; i < thelength1; ++i) > { > node = [allTableNodes item:i]; > attributes = [node attributes]; > > att = [attributes item:0];
Does your table element have multiple attributes? The DOM Level 2 specification states that for NamedNodeMap there is no specified order to the attributes. It could just be coincidence that the larger window puts attributes in one order, and the smaller in another. If you know the name of your attribute, why not just call: attr = [attributes getNamedItem:@"someName"]; > attValue = [att nodeValue]; > if(attValue != nil) > { > isItInThere = [attValue rangeOfString:@"nol"]; > > if (isItInThere.location != NSNotFound) > //---------- this bothers me, what is the non negative way of asking this > if statement? > if (![attValue isEqualToString: @"cmpb nol"]) > {break;} > } > } _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com