ios - Dynamic Nested or MultiDimensional Array -


i wanted implement nested nsmutablearray in xml data. array structures this,

nsmutablearray *subarray = [nsmutablearray arraywithobjects: sub_name, sub_desc, sub_imagelink, nil]; nsmutablearray *myarray= [nsmutablearray arraywithobjects:                           [nsmutablearray arraywithobjects: (nsstring *)name, (nsstring *)desc, (nsstring *)imagelink, subarray,nil],                           [nsmutablearray arraywithobjects: (nsstring *)name, (nsstring *)desc, (nsstring *)imagelink, subarray,nil],                           [nsmutablearray arraywithobjects: (nsstring *)name, (nsstring *)desc, (nsstring *)imagelink, subarray,nil], nil]; 

the xml this,

<category>         <name>drinks</name>         <description>drink description</description>         <image> link here </image>             <sub_cat>                 <sub_name>sub name of drink</sub_name>                 <sub_desc>sub description of drink</sub_desc>                 <sub_image>sub link of drink </sub_image>             </sub_cat>             <sub_cat>                 <sub_name>sub name of drink</sub_name>                 <sub_desc>sub description of drink</sub_desc>                 <sub_image>sub link of drink </sub_image>             </sub_cat> </category> 

im trying implement in didstartelement , didendelement, , im confuse , lost in this, been cracking head week too. appreciate suggestions.

how implement tbxml given xml or gdata implementation, need quick sample, im beginner @ 1 thats why im needing guide me in right way.

i suggest read this tutorial how read , write xml file in ios. uses gdataxml library read/write xml file. steps give how use library in existing project. try parse xml file using libraries, prevent lot of problems.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -