Thanks for the nice framework.
I'm trying to use kissXML framework. I'm using NSXML's documentation
as reference.
I wanted to write following piece of code[apple's NSXML] using kissXML
NSXMLElement *root =
(NSXMLElement *)[NSXMLNode elementWithName:@"addresses"];
NSXMLDocument *xmlDoc = [[NSXMLDocument alloc]
initWithRootElement:root];
I tried to convert the above sample program. But I'm not able to find
equivalent method for initWithRootElement.
Is there any equivalent way to achieve the same using kissXML
framework.
thanks in advance.
-- Anil
Not sure if you can initialise a DDXMLDocument using a DDXMLElement, but you can do it like this:
DDXMLDocument* document = [[[DDXMLDocument alloc] initWithXMLString:@"<addresses/>" options:0 error:nil] autorelease];
DDXMLElement* root = [document rootElement];
[root addChild:[DDXMLNode elementWithName:@"address" stringValue:@"Some Address"]];
This will give you:
<addresses>
<address>Some Address</address>
</addresses>
Hope that helps.
Cheers,
Nathan
-Robbie Hanson
> --
> You received this message because you are subscribed to the Google Groups "KissXML" group.
> To post to this group, send email to kis...@googlegroups.com.
> To unsubscribe from this group, send email to kissxml+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/kissxml?hl=en.
>
-- Anil