nsxml

Maximum length of [NSXMLNode stringValue]

Hello all, I have an XML document which contains an element that is over 90,000 characters in length*. NSXMLNode* node = ...; NSString* val = [node stringValue]; // this is not the full contents of the node! The second line only gives me 80k or so. This is obviously not what I want, so I'd appreciate some suggestions. Is NSXMLNode b...

NSXMLParser Leaking

Hello, I have the following code that leaks. Instruments says that it is the rssParser object that is leaking. I "refresh" the XML feed and it runs the block and it leaks.... file.h @interface TestAppDelegate : NSObject <UIApplicationDelegate> { NSXMLParser *rssParser; } file.m NSData *data = [ NSURLConnection sendSynchrono...

NSXML replacing "<" with "%lt;"

I see there are other questions related to this, but none using NSXML. So, I'm constructing an XML document from scratch using NSXML and when I create a NSXMLNode with a string value, all the "<" characters in that string are replaced with "& lt;" when I output the node, or save it to a file. Example: NSXMLNode *description = [NSXMLN...

modifying string content of XML file in CDATA block

Hi, How can i modifying the string content in CDATA block of an XML file, such as For reference[(text)] please look below syntax, <![CDATA[<FlowDocument FontFamily="Helvetica" FontSize="24" Foreground="#FFFFFF00" TextAlignment="Left" PagePadding="5,0,5,0" AllowDrop="True" xmlns="http://xyz.com"&gt;&l...

writing CDATA block to NSXMLDocument file

Hi, How can one write CDATA block in XML file and save it to a file in cocoa. ...

Check the Node kind in an XML Tree

I have constructed an XML tree from an XML file. While constructing I do initWithKnd: or initWithKind: options: method. How can I check if a node is of Element or CDATA or ay other kind while tracing the XML tree. ...

which is faster ? NSXMLParser or KissXML

HI, i need a XML parser. i want to know that which one is faster? NSXMLParser or KissXML ? looking forward for replies... ...

How to get attributes from an element in XML

I have constructed an XML tree structure of an XML file. I am able to trace the entire tree. When i want to retrieve the attributes of an element, it is returning as NSXMlNode of kind NSXMLAttributeKind. How can i extract the key value pairs in the attribute node. ...

How to Parse through nsXml Parser.

Hey All, i am very new to iphone Development and i am asked to use nsxml parser to parse xml from a google api. i have parsed another url which has xml but i am not able to parse google's because it is using id's to store data rather than inside tag. i.e. <forecast_information> <city data="Anaheim, CA"/> <postal_code data="anah...

Text encoding problem between NSImage, NSData, and NSXMLDocument

I'm attempting to take an NSImage and convert it to a string which I can write in an XML document. My current attempt looks something like this: [xmlDocument setCharacterEncoding: @"US-ASCII"]; NSData* data = [image TIFFRepresentation]; NSString* string = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; //Put stri...

How can i loop all nodes in an XML document in objective-c and change their values then save the xml?

Hiya - I am really struggling here - I want to load an XML document in objective-c and loop each node and encrypt the string value of that node. Then encryption bit i have sorted but when i run the following code it just changes the root node and every other node and not the values of the nodes. e.g. - i want to go from: <root> <...

problem while xmlParsing

Hello everybody. I am calling a webservice which returns xml data. Now when i receive the xml data, it is all distorted. all the escape characters like "<", ">" and " ' " are converted to html format ie and &quot So now, the parser is not able to recognize the tags. Plz help me, what shud i do? this is my response from webservice ...

Have NSXMLParser parse the contents of multiple URLs at once

I've been using NSXMLParser on the iPhone to parse out XML files from the web without any problems. I'm now in a situation though where I want to get the contents of three different URLs and then parse them all at once. I'm doing this by creating three NSMutableData instances, each filled with the contents of one of the three URLs. I'm ...

NSXMLDocument: missing nodes

I'm trying to parse some placemarks on a Google Earth .kml file. I'm creating the document, and going through the placemarks, and I'm able to access all placemark names, but I can't access their descriptions: for (NSXMLNode *placemark in nodes) { NSArray *elements = [placemark nodesForXPath: @"name" error:&err]; NSXMLNod...

Want to load specific HTML tags in UIWebView from a website

I have use NSXMLparser to parse some XML from feeburner and onto my app. I have carefully selected the tags for the title, author, publication date and the summary and assigned them to the cell label and detail label in my UITableView. - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{ if ([currentElement isEqualTo...

Using NSXMLElement to add a tag in the middle of a block of text.

I need to create an XML document with the following type of format. <Para> This is some text about <someMethod> that you need to know about. </Para> I'm having no issues with general XML generation, but this one aspect is giving me some issues. Thanks folks Scott ...

Extracting info. from XML into Cocoa

I am trying to parse an XML to extract values of certain variables. Here's an example: <?xml version='1.0'?> <Main xmlns='http://www.abc.uk' version='1.0' name='full'> <child1 version='2.0'> <value1> xyz </value1> <userinfo> <name> joe </name> <pass> joepass </pass> </userinfo> </child1> </Root> Ques...