discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXML* classes


From: Fred Kiefer
Subject: Re: NSXML* classes
Date: Sun, 26 Feb 2012 21:41:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2

On 26.02.2012 18:58, Ivan Vučica wrote:
However, looks like an XPath query called on an NSXMLNode still doesn't
return results as under OS X. That is, having called:

   NSArray *opmlNodes = [self nodesForXPath:@"./opml" error:nil];
   [self setOpmlRoot:[opmlNodes objectAtIndex:0]];

with self being a subclass of NSXMLDocument, and thus getting the root
node, the following call does not return the<body/>  subnode of the<opml/>
root node, instead returning an array with zero entries:

   bodyNodes = [_opmlRoot nodesForXPath:@"./body" error:nil];

Looking at execute_xpath() in NSXMLNode.m, I must admit I have no idea what
may be going wrong.

If anyone wants to debug using my code, feel free to focus on the following
files that actually deal with the data model:
OPMLOutline.h
OPMLOutline.m
OPMLOutline+Private.h
OPMLOutlineXMLElement.h
OPMLOutlineXMLElement.m

I managed to reproduce and hopefully fix the XPath issue you are seeing. But there is a much deeper problem for your code. You rely on the fact to be able to replace the class of a node while parsing an XML document. This currently doesn't work with GNustep. I have a few ideas on how to fix this, but it will take some time.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]