开发者

iphone problem with KIssXML parser

开发者 https://www.devze.com 2023-03-31 02:47 出处:网络
I need quick help structure of xml is like this <VacancyList generated=\"2011-08-26T09:06:13\" xsi:schemaLocation=\"http://www.abc.com/dtd/vacancy-list.xsd\"><Vacancy id=\"157890\" date_sta

I need quick help

structure of xml is like this

<VacancyList generated="2011-08-26T09:06:13" xsi:schemaLocation="http://www.abc.com/dtd/vacancy-list.xsd"><Vacancy id="157890" date_start="2010-10-12" date_end="2011-12-31" reference_number=""><Versions><Version language="nb">

and I am using KissXML like this

DDXMLDocument *theDocument = [[DDXMLDocument alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"https://pwc.easycruit.com/export/xml/vacancy/list.xml"]] options:0 error:&error];
NSArray* resultNodes = nil;
resultNodes = [theDocument nodesForXPath:@"Versions" error:&error];

b开发者_StackOverflow社区ut results is always blank. Please help me with this


XML is case sensitive. You are looking for "versions" in your xpath query and not "Versions" (which is what exists in your document). I think that is your problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消