Jump to content

How do I add XML sub categories to this ?

rayogamba's Photo
Posted Nov 16 2009 02:13 PM
3457 Views

<?xml version="1.0" encoding="utf-8"?>
<data>
<page>
<item type_id="0" enable="1" label="" xml_url="data/page_splash.xml"/>
<item type_id="1" enable="1" label="ABOUT US" xml_url="data/page_about.xml"/>
<item type_id="2" enable="1" label="ASOLOS" xml_url="data/page_asolos.xml"/>
<item type_id="2" enable="1" label="MAURIS 8900" xml_url="data/page_mauris.xml"/>
<item type_id="2" enable="1" label="MAURIS 8911" xml_url="data/page_mauris8911.xml"/>
<item type_id="2" enable="1" label="MAURIS 2010" xml_url="data/page_mauris2010.xml"/>
<item type_id="2" enable="1" label="COOGI" xml_url="data/page_mauris2010.xml"/>
<item type_id="3" enable="1" label="CONTACT US" xml_url="data/page_contact.xml"/>
</page>
</data>

Tags:
0 Subscribe


1 Reply

+ 2
  mattheww's Photo
Posted Nov 16 2009 03:37 PM

Instead of closing the <item /> tags on each line, you can add subcategories by including both opening and closing <item> tags with new tags nested between them.

Ex:
<item type_id="1" enable="1" label="ABOUT US" xml_url="data/page_about.xml">
    <sub label="EMAIL" data="example@email" />
    <sub label="PHONE" data="707.888.8888" />
</item>



Hopefully this helps,
Matthew