views:

66

answers:

1

Hi all,

I have a xml source and now i would like to present in my tableview.

Source code for xml:

<NewsML> 
  <Catalog Href="http://www.afp.com/dtd/AFPCatalog.xml"/&gt; 
  <NewsEnvelope> 
 <DateAndTime>20091123T171818Z</DateAndTime> 
  </NewsEnvelope> 
  <NewsItem> 
 <Identification> 
   <NewsIdentifier> 
  <ProviderId>afp.com</ProviderId> 
  <DateId>20091123</DateId> 
  <NewsItemId>ext--english--infindo--olympics</NewsItemId> 
  <RevisionId PreviousRevision="0" Update="N">1</RevisionId> 
  <PublicIdentifier>urn:newsml:afp.com:20091123:ext--english--infindo--olympics:1</PublicIdentifier> 
   </NewsIdentifier> 
   <NameLabel></NameLabel> 
 </Identification> 
 <NewsManagement> 
   <NewsItemType FormalName="News"/> 
   <FirstCreated>20091123T171818Z</FirstCreated> 
   <ThisRevisionCreated>20091123T171818Z</ThisRevisionCreated> 
   <Status FormalName="Usable"/> 
 </NewsManagement> 
 <NewsComponent> 
   <AdministrativeMetadata> 
  <Provider> 
    <Party FormalName="AFP"/> 
  </Provider> 
   </AdministrativeMetadata> 
   <DescriptiveMetadata> 
  <Language FormalName="en"/> 
   </DescriptiveMetadata> 
   <NewsComponent> 
  <NewsLines> 
    <HeadLine>Speedskating: US coach of Norwegian team fired</HeadLine> 
  </NewsLines> 
  <NewsItemRef NewsItem="091123171708.6i0al11e.xml"/> 
   </NewsComponent> 
   <NewsComponent> 
  <NewsLines> 
    <HeadLine>Nordic skiing: World Cup relay results</HeadLine> 
  </NewsLines> 
  <NewsItemRef NewsItem="091122150812.uqxmotrc.xml"/> 
   </NewsComponent> 
   <NewsComponent> 
  <NewsLines> 
    <HeadLine>Nordic skiing: World Cup nordic skiing results</HeadLine> 
  </NewsLines> 
  <NewsItemRef NewsItem="091121165450.z40an55q.xml"/> 
   </NewsComponent> 
   <NewsComponent> 
  <NewsLines> 
    <HeadLine>Speed skating: CAS sets date for Pechstein ruling</HeadLine> 
  </NewsLines> 
  <NewsItemRef NewsItem="091119142901.jprznv03.xml"/> 
   </NewsComponent> 
 </NewsComponent> 
  </NewsItem> 
</NewsML>

XML link: http://data.moliscgateway.com/afpdata/afpfeeds?feedPath=topics/olympics/index.xml

Now i can show the "HeadLine" value in my root view of tableview (eg Speed skating: CAS sets date for Pechstein ruling). But when i tap on this table row will push to detail view (detail view will have another xml link) with value of . How can i do it? Thanks.

+1  A: 

You're really asking about quite a lot. My advice to you is to slowly go through Apple's Core Data sample projects (example), the Cocoa Dev Central Core Data tutorial to get down how to integrate tables and data models. Then, if you're comfortable with C, take a look at Apple's XMLPerformance sample project, which makes use of libxml2.

Alex Reynolds