Re: NSXMLDocument question
Re: NSXMLDocument question
- Subject: Re: NSXMLDocument question
- From: malcom <email@hidden>
- Date: Sat, 4 Mar 2006 17:29:57 +0100
Thank you Sarah,
Ok it now works but there is a problem when XML classes try to
encapsulate an NSString. < chars will be not converted automatically
and it still remain < so the final html string does not well rendered
by WebKit.
This is a short part of my code. Is there another way to convert
automatically <? Or need I do to it with replace functions of
NSString?
NSXMLElement *node = [[NSXMLElement alloc]
initWithKind:NSXMLElementKind options: NSXMLNodePreserveAll];
[node setName:@"TEXT"];
// VALUE & QUOTE
NSXMLElement *valueNode = [[NSXMLElement alloc] initWithKind:
NSXMLElementKind options:NSXMLNodePreserveAll];
[valueNode setName: @"VALUE"];
[valueNode setStringValue: [[_text objectAtIndex:k] getText]];
NSXMLElement *quoteNode = [[NSXMLElement alloc] initWithKind:
NSXMLElementKind options:NSXMLNodePreserveAll];
[quoteNode setName: @"QUOTE"];
[quoteNode setStringValue: [NSString
stringWithFormat:@"%d", [[_text
objectAtIndex:k] state]]];
[node addChild: valueNode];
[node addChild: quoteNode];
[rootText addChild: node];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden