Hi,

I use GNUStep on Windows XP and I work with XML.
I built a NSXMLDocument from NSData, and I read each NSXMLNode (with a tree
parser).
I overrode elementsByName which is not yet implemented : no problem.

I can read names and attributes (keys and values) but no CData blocks !!
I tried a lot of options, I checked encoding, etc. : on Mac, [node
stringValue] give me the CData string, but on Windows (same code), I always
have an empty string.

EXAMPLE:

<root><node><![CDATA[How to read this text ?]]></node></root>

NSXMLDocument * document = [[[NSXMLDocument alloc] initWithData:data
options:(NSXMLNodePreserveCDATA | NSXMLNodePreserveWhitespace)
error:outError] autorelease];
NSXMLElement * rootElement = [document rootElement];
NSXMLNode *childNode = [rootElement childAtIndex:0];
NSString *cData = [childNode stringValue];



Thx for your help.
John.
-- 
View this message in context: 
http://old.nabble.com/Reading-CData-from-NSXMLNode-tp34383080p34383080.html
Sent from the GNUstep - General mailing list archive at Nabble.com.


_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to