I would like to loop recursively over DDXMLDocument, and to change the elements attributes.
How can I do it ? I currently have the document and the root element:
DDXMLDocument *theDocument = [[DDXMLDocument alloc] initWithXMLString:content options:0 error:&error];
DDXMLElement *rootElement = theDocument.rootElement;
postfix tree walk implemented:
-(void)processNode:(DDXMLNode *)node {
if(node.kind == DDXMLElementKind) {
//...
for(DDXMLNode *child in node.children) {
[self processNode:child];
}
}
}