dynamic xml with php

mearledaypymn

New Member
Trying to write a XML file populated with information fetched from a directory listing but I can't figure out how to get the createElement menthods to play nice with dynamic content.I'm tempted to just hard code in the tags like a dynamic table and then just take the entire output and post it to the xml file but i'm not sure how to drop in preformated tags into the xml either.my XML needs to be formated as thus\[code\]<CONTENT> <GALLERY name="**HARDCODED DATA**"> <CATEGORY name="**HARDCODED DATA BASED FROM DIRECTORY SEARCH 1**" desc="**HARDCODED DATA BASED FROM DIRECTORY SEARCH 1**" thumb="**HARDCODED DATA BASED FROM DIRECTORY SEARCH 1**"> <ITEM> <file_path>**dynamic content from directory search**</file_path> <file_width>**HARDCODED**</file_width> <file_height>**HARDCODED**</file_height> <file_title>**dynamic content from directory search**</file_title> <file_desc>**Loaded from a seperate txt file, index to match with the index of the dir file**</file_desc> <file_image>**Loaded from a seperate txt file, index to match with the index of the dir file**</file_image> <featured_image>**Loaded from a seperate txt file, index to match with the index of the dir file**</featured_image> <featured_or_not>**Loaded from a seperate txt file, index to match with the index of the dir file**</featured_or_not> </ITEM>****loop through for next ITEM**** </CATEGORY>****start next category from secody directory search content**** </GALLERY>****start gallery 2 and 3 here, same format at gallery 1****</CONTENT>\[/code\]
 
Back
Top