Hey everyone,
So I have an XML file and am using TouchXML to read it. There are only some elements in the XML file that I require.
So I created a class 'Contact' with properties that I wish to save from the XML file.
What i've come up with so far is this:
NSMutableArray *res = [[NSMutableArray alloc] init];
CXMLDocument *doc = [[[...
Hi,
I have a xml document which has only one element in the document. This is the whole document.
<?xml version="1.0" encoding="UTF-8"?>
<error>key ! is invalid</error>
But when i try to parse it, it says this document has no element at all. In other words when i try to access the rootElement it says "null"
Here is the code i am usi...
Hi all,
I'm using TouchXML to parse an XML-stream the following way:
CXMLDocument *parser = [[CXMLDocument alloc] initWithXMLString:responseString options:0 error:nil];
[responseString release];
// array holding all the nodes
NSArray *directionNodes = [parser nodesForXPath:@"//direction" error:nil];
NSArray *linieNodes = [parser nodes...
Could some one please tell me how do we use the text function in the
XPath query.
I needed the information for Hillman Library present in the xml
http://www.sis.pitt.edu/~arazeez/Librarydata.xml
resultNodes = [rssParser nodesForXPath:@"//Library[1]/Hours/TermOrHolidays" error:nil];.
for now I used the [1]. But I wanted to use the tex...
Could some one please tell me how do we use the text function with variable in the XPath query in c-objective for iphone. I needed the information for Engineering Library present in the xml
http://www.sis.pitt.edu/~arazeez/Librarydata.xml
NSString *libName = @"Engineering Library";
NSMutableString *xpathquery = [[NSMutableString a...
Hi,
I have the following RSS feed that I'm trying to parse using touchXML for an iphone application.
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:ext="http://ooyala.com/syndication/ext/" xmlns:mediasl="http://www.slide.com/funspace/developer/" xmlns:itunes="http://www.it...
I have the following code:
NSString *subtitle = [[[node elementsForName:@"subtitle"] objectAtIndex:0] stringValue];
NSString *duration = [[[node elementsForName:@"itunes:duration"] objectAtIndex:0] stringValue];
The first line works perfectly. The second line though won't work. I assume it has something to do with namespaces, but I'm ...
Hello everybody,
I've got a tableview. In the "ViewDidLoad" method I have filled an array with CXMLElements. On debugging, I have seen that these are all CXMLNodes.
CXMLElement has a property to get the subelements which is called "elementsForName".
In the "cellForRowAtIndexPath:" method I used this property:
- (UITableViewCell *)t...
Say I have an invalid XML. For some reason, TouchXML still sees it as a valid object.
For example:
NSString *str = @"?> obviously invalid!";
NSData *data = [str dataUsingEncoding:NSASCIIStringEncoding];
NSError *parseError = nil;
CXMLDocument *document = [[[CXMLDocument alloc] initWithData:data encoding:NSASCIIStringEncoding options:0...
Hey guys,
has any of you some experience with parsing HTML with the TouchXML lib on the iPhone. I would like to parse some html and therefore try to do the following
self.parser = [[CXMLDocument alloc]initWithData:self.html options:0 error:&error1];
if (error1) {
NSLog(@"Error: %d", error1);
}
NSError *error;
NSArray *resultNod...
Hi everyone, i've another problem with obj-c:
i'm trying to parse this XML :
here's the case:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body>
<GetMyDas...
Hi,
I have a large XML file ( around 1mb ) . i want to ask that if i parse the XML with NSXMLParser or KissXML/TouchXML.
which will take less interim memroy ?? ( the memroy took during parsing ) .
...
Hi all, I am trying to build an app which during start-up connects to website and downloads the XML data. Though the data is large(100 KB) and i am using TouchXml for it. The xml is like this.
<?xml version="1.0" encoding="UTF-8"?>
<itemA attA="AAA" attB="BBB" attC="CCC">
<itemB>
<itemC1 attD="DDD" attE="EEE" attF="FFF...
Hi all.
I am displaying RSS feeds in my table view.
as there are hundred of feeds so my application takes lots of time to load them and display them i want to load just first 25 feed and display them in Table view and when User Click on More 25 application load next 25 and display them.
Any Idea........... :)
I am using TouchXML t...
I'm in the making of an application where I'm using TouchXML to parse an XML containing airport flight information.
The XML looks like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<airport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://flydata.avinor.no/XmlFeed.xsd" name="OSL">
<fli...
Hi all
I am parsing my xml with libxml ,my code is as follows
-(void) grabRSSFeed:(NSString *)blogAddress {
// Initialize the blogEntries MutableArray that we declared in the header
blogEntries = [[NSMutableArray alloc] init];
// Convert the supplied URL string into a usable URL object
NSURL *url = [NSURL URLWithString: blogAddr...