Question: Total newbie here on iPhone/iPad development, so forgive me if this seems like a strange question.

Given that most objects (or group of objects) in a view within a `UIViewController` need to have an event callback defined, would it seem reasonable to group the callbacks into separate .m files and then `#import` them after the `@implementation` of the viewcontroller?

This way, the standard methods, i`nitWithNibName:`, `-viewDidLoad`, `shouldAutoRotateInterfaceOrientation:`, `didReceiveMemoryWarning:`, `-viewDidUnload` and dealloc (as provided by Xcode) would be the only methods defined in your viewcontroller.m file. The viewcontroller.m file would not become this monolithic monstrosity of event callbacks and would be simpler to maintain. I'm thinking you put them after your `@synthesize` outlets.

Thoughts?

Answer: 
Your expression:

> 
> ./bar[@key]
> 
> 
> 

It means: *`bar` children having `key` attribute* 

If you want to select the attribute, use this relative expression:

```
bar/@key

```

It means: *the `key` attribute of `bar` children* 

Of course, you need to consider to use a fully compliant XPath engine like [lxml](http://lxml.de/).
For going deeper into the tree this type of functions can be used.

```
root[1][2][0].tag  # For displaying the nodes
root[1][2][0].text # For showing what's inside the node

```