- (const xmlChar *)xmlStringForDoc:(xmlDocPtr)doc
{
return xmlEncodeSpecialChars(doc, (xmlChar *)[self UTF8String]);
}
And in
- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix
I changed
xmlNodePtr node = xmlNewDocNode(doc, NULL, [nodeName xmlString], [self xmlString]);
to
xmlNodePtr node = xmlNewDocNode(doc, NULL, [nodeName xmlStringForDoc:doc], [self xmlStringForDoc:doc]);
It would be great to have this reviewed from someone more familiar with libxml and the project.
Thanks,
Brian