[xml] Creating XMLElement from XML String
- From: "Apparao Mulpuri" <apparao forums gmail com>
- To: xml gnome org
- Subject: [xml] Creating XMLElement from XML String
- Date: Sat, 20 Sep 2008 10:30:45 +0530
Hi List,
I am trying to create a XMLElement form a XMLString. Here is the
method implementation in Apple Mac OS X which is not working:
- (id)initWithXMLString:(NSString *)string error:(NSError **)error
xmlDocPtr _xmlDoc = xmlParseDoc((xmlChar *)[string UTF8String]);
NSLog(@"_xmlDoc::%s",_xmlDoc); --- it returns NULL here
if (_xmlDoc != NULL)
{
elementNode = xmlDocGetRootElement(_xmlDoc);
// elementNode is xmlNodePtr type
xmlFreeDoc(_xmlDoc);
}
}
return self;
}
Is there any problem with the above code. Is there any function
available for creating element node from xmlString?.
Thanks,
- Apparao Mulpuri.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]