Questions tagged [nsxml]

NSXML is Apple's Objective C API for doing tree-based XML document parsing and construction.

74 questions
10
votes
3 answers

NSXMLParser can't parse special characters (accents)

I'm using NSXMLParser to parse an xml from a url (my code is almost exactly the same as here) Some of the elements contain special characters like "á" which causes a word lik ándre to split into two (á and ndre). Here is my loadXMLByURL -(id)…
Andrew Davis
  • 2,310
  • 1
  • 24
  • 43
9
votes
4 answers

NSXMLParser Leaking

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 { …
Lee Armstrong
  • 11,420
  • 15
  • 74
  • 122
6
votes
1 answer

Cocoa - How To Format An XML File

Is there a way that I can format an XML file in the proper way when creating it programmatically? For example, if I use this code to create a simple XML File: NSXMLElement *fallback_driver = [[NSXMLElement alloc]…
Kevin
  • 1,469
  • 2
  • 19
  • 28
5
votes
4 answers

Use NSXMLParser to only parse the first ten posts, then parse next lot separately

I am using NSXmlParser to parse through an rss feed. All is working well so far. I'm anticipating the rss feed will eventually contains dozens/hundreds of posts. My current solution is reading the entire rss feed and displaying the results. However…
Andrew Davis
  • 2,310
  • 1
  • 24
  • 43
4
votes
1 answer

How to get data from a website in xml format and parse that data to do stuff using objective-c

I want to get the data from the website careercup.com in xml format and parse that using objective c and hopefully load some resulting data onto a plist file. Could anyone guide me on how to go about doing this? Meaning how to get the data from the…
anonuser0428
  • 11,789
  • 22
  • 63
  • 86
4
votes
3 answers

NSXMLElement with solo tag . ie.

I'm trying to create a XML string which should contain solo tags (ie. tag without separate closing tags) I am able to create normal xml tags like using the code NSXMLElement *childElement=[[NSXMLElement…
Renjith
  • 83
  • 1
  • 7
3
votes
1 answer

writing CDATA block to NSXMLDocument file

How can one write CDATA block in XML file and save it to a file in cocoa.
boom
  • 5,856
  • 24
  • 61
  • 96
2
votes
1 answer

NSXMLParserDelegate Methods Not Being Called

I've done an NSXML Parser before, but for some reason this time my NSXMLParserDelegate methods aren't being called when I call parse. Here's where I call parse: - (void)parseXMLFile:(NSString *)pathToFile { NSURL* xmlURL = [NSURL…
Thorax
  • 53
  • 5
2
votes
2 answers

Difficulty parsing response containing characters like '\u00'

I am using NSXML Parser to do parsing in my iPhone app. Now everything works fine except when data comes in French language. For example, data from server comes as Ch\u00e9rie FM. Now under the string argument of foundCharacters method, I only get…
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216
2
votes
1 answer

iphone - skip a section of data when downloading?

I am currently using NSURLConnection to download some date from a database through a php script on a server. The connection works fine and data is received correctly. However I have a problem when I come to parse the data. I am currently trying to…
Donal Rafferty
  • 19,707
  • 39
  • 114
  • 191
2
votes
2 answers

Subtracting duration from dateTime in Cocoa's NSXML XQuery

I have the following XQuery code, which from my reading of the O'Reilly XQuery book seems like it should work: let $now := current-dateTime() let $month := xs:dayTimeDuration("P30D") let $month_ago := $now - $month return $month_ago It works fine…
Gabriel Roth
  • 1,030
  • 1
  • 12
  • 31
2
votes
1 answer

NSXMLDocument validateAndReturnError requires network connection?

I am trying to validate an XML Schema document against the schema for schemas (http://www.w3.org/2001/XMLSchema) using NSXMLDocument. I've gotten it to work correctly, and assumed that I was validating against a local schema. However, I discovered…
Dimitri
  • 233
  • 1
  • 2
  • 9
2
votes
1 answer

libxml2 example (with wrapper)

I am using the XML parser libxml2 with wrapper as given on the page http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html But i am not sure if I am using correctly and am getting errors (parsing,etc) So could someone please…
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
2
votes
1 answer

How to fetch contact list from Gmail using xmpp framework

I am trying to make a chat application. I am using XMPP framework to fetch the contact list from Gmail account. I am able to receive chat buddies, but I want all the contacts from my gmail account. I want to retrieve all contacts instead of only…
Jayshree
  • 281
  • 1
  • 6
  • 28
2
votes
2 answers

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. This is some text about that you need to know about. I'm having no issues with general XML generation, but this one aspect is giving me some issues.
1
2 3 4 5