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: 
This will find the first instance of an element named `bar` and return the value of the attribute `key`.

```
In [52]: import xml.etree.ElementTree as ET

In [53]: xml=ET.fromstring(contents)

In [54]: xml.find('./bar').attrib['key']
Out[54]: 'value'

```
By following method you can get all attributes from xml (in Dictionary)

```
import xml.etree.ElementTree as etree
xmlString= "<feed xml:lang='en'><title>World Wide Web</title><subtitle lang='en'>Programming challenges</subtitle><link rel='alternate' type='text/html' href='http://google.com/'/><updated>2019-12-25T12:00:00</updated></feed>"
xml= etree.fromstring(xmlString)  

def get_attr(xml):
    attributes = []
    for child in (xml):
        if len(child.attrib)!= 0:
            attributes.append(child.attrib)
        get_attr(child)
    return attributes
attributes = get_attr(xml)

print(attributes)

```