I am having some problems with XML writing to a file. I am trying to create a tree with some elements in it, however the errors that I am getting are quite baffling, at least to me.
Below is an image of the errors that I am getting.. Can anyone shed some lights on them?

Not sure if the image will be displayed large enough.. if not here is the link to the image: https://i.stack.imgur.com/5zrt1.png
Apart from the last one (I have not declared anything to be returned), what is the problem with the other errors and warning?
Here is the code in text:
-(NSData *)constructXMLRequest
{
NSXMLElement *root = [[NSXMLElement alloc] initWithName:@"items"];
NSXMLElement *item0 = [[NSXMLElement alloc] initWithName:@"item"];
[item0 addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:@"0"]];
NSXMLElement *object = [[NSXMLElement alloc] initWithName:@"object"];
[object setStringValue:@"object 1"];
NSXMLElement *description [[NSXMLElement alloc] initWithName:@"description"];
[object setStringValue:@"description 1"];
[item0 addChild:object];
[item0 addChild:description];
[root addChild:item0];
}
Errors:
- error: expected ‘]’ before ‘initWithName’
- error: ‘description’ undeclared (first use in this function)
Thanks
“Expected “]” before initWithName” seems first error. You have missed assignent in that line.
Second error will go off automatically.