tags:

views:

23

answers:

0

I've tried this:

GDataXMLElement * body = [GDataXMLNode elementWithName:@"body"];
[body addChild:[GDataXMLNode elementWithName:@"request" stringValue:@"<![CDATA[ <hello> ]]>"]];
NSLog(@"%@",[body XMLString]);

And it outputs:

<body><request>&lt;![CDATA[&lt;hello&gt; ]]&gt;</request></body`>

But want it to be like this:

<body><request><![CDATA[ <hello> ]]></request></body>

any idea how can I tell the parser that the GDataXMLNode should be a CDATA kind?