| Issue 79: | Feature Request: -setStringValue: support for text nodes | |
| 2 people starred this issue and may be notified of changes. | Back to list |
I looked high and low for an easy solution to be able to change text nodes in an XML document and came to the conclusion that adding this functionality to TouchXML would be the easiest way to go (not in the least because I'm already using TouchXML, of course ;)
This is the code I used to achieve this functionality (in CXMLNode_CreationExtensions.m)
{{{
- (void)setStringValue:(NSString *)inStringValue
{
if (_node->type == XML_TEXT_NODE)
xmlNodeSetContent(_node, (const xmlChar *)[inStringValue UTF8String]);
else
NSAssert(NO, @"TODO");
}
}}}
Jun 29, 2010
Project Member
#1
jwight
Status:
Fixed
|