• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Where is NSXMLChildren defined?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is NSXMLChildren defined?


  • Subject: Re: Where is NSXMLChildren defined?
  • From: Tito Ciuro <email@hidden>
  • Date: Tue, 28 Jun 2005 09:11:12 -0400

Hello,

On 28/06/2005, at 7:41, Finlay Dobbie wrote:

On 6/28/05, Tito Ciuro <email@hidden> wrote:

Debugging an XML document I got this output:


<NSXMLChildren 0x388a30>(
xsi:type="xsd:float"
)


What is NSXMLChildren and what methods may I invoke on it?


How did you get it? The API that returned it to you should provide some context as to what it is. Anyway, it seems that it's a private subclass of NSMutableArray.

Here's the code:

NSXMLDocument *doc = [[[NSXMLDocument alloc] initWithData:data options:NSXMLNodeOptionsNone error:&error] autorelease];

// Get the body
NSArray *body = [doc nodesForXPath:@"SOAP-ENV:Envelope/SOAP- ENV:Body" error:&error];
NSXMLElement *bodyElement = [body objectAtIndex:0];
NSArray *bodyChildren = [bodyElement children];

The debugger stuff:

(gdb) p(int) [[bodyChildren objectAtIndex:0]childCount]
$1 = 2

(gdb) po [[bodyChildren objectAtIndex:0]childAtIndex:0]
<Number_1 xsi:type="xsd:float">0</Number_1>

(gdb) po [[[bodyChildren objectAtIndex:0]childAtIndex:0]class]
NSXMLElement

(gdb) po [[[bodyChildren objectAtIndex:0]childAtIndex:0]attributes]
<NSXMLChildren 0x3897a0>(
xsi:type="xsd:float"
)

(gdb) po [[[[bodyChildren objectAtIndex:0]childAtIndex:0]attributes] objectAtIndex:0]
xsi:type="xsd:float"


(gdb) po [[[[[bodyChildren objectAtIndex:0]childAtIndex:0] attributes]objectAtIndex:0]class]
NSXMLNamedNode


So yes, you're right, NSXMLChildren is a sublass of NSArray and contains one element of type NSXMLNamedNode. What is NSXMLNamedNode? Is it just a subclass of NSString? I cannot seem to invoke any XML- related methods on it...

Thanks again,

-- Tito
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Where is NSXMLChildren defined?
      • From: Finlay Dobbie <email@hidden>
References: 
 >Where is NSXMLChildren defined? (From: Tito Ciuro <email@hidden>)
 >Re: Where is NSXMLChildren defined? (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: NSApp with CLI access
  • Next by Date: Re: WindowController fails when trying add a panel [Name Warning]
  • Previous by thread: Re: Where is NSXMLChildren defined?
  • Next by thread: Re: Where is NSXMLChildren defined?
  • Index(es):
    • Date
    • Thread