I am making a Cocoa app that parses nib/xib files and gives all its subviews details.Parsing the document is pretty cool with the NSXMlDocument but having a problem at one place to how to get the desired value from the xml structure.
This is the structure:
I am getting all the child nodes but not the label attributes.How to get the attributes? i used attributeKeys property on the XmlNode but its giving me empty array.Is there any property that gives me the desired value from the structure?
Any help would be appreciated.
I just want to get the id of the Label from the structure.
Its been good to find out the answer myself.After getting the NSXmlNode object just upcast it to NSXmlElement and send message attributeForName to get the value.
In my case,
let sc = subviews?.childCount
for var x = 0 ; x < sc ; x = x + 1 {
}