Creating multiLevel XML document.
Posted: Sun Jul 03, 2011 6:16 am
Hi Guys,
I have probably overlooked something very simple here, but I can't find any examples in PHP of this working. I need to create a multi Level XML document, in the following format
Example:
I am already creating simple XML documents, which are a single level.
Example:
Can anybody help me out with the method to create multilevel XML?
Thanks
Noodle
I have probably overlooked something very simple here, but I can't find any examples in PHP of this working. I need to create a multi Level XML document, in the following format
Example:
Code: Select all
<root>
<Section1>
<Item>
<data1>A VALUE</data1>
<data2>A VALUE</data2>
<data3>A VALUE</data3>
</item>
<Item>
<data1>A VALUE</data1>
<data2>A VALUE</data2>
<data3>A VALUE</data3>
</item>
<Item>
<data1>A VALUE</data1>
<data2>A VALUE</data2>
<data3>A VALUE</data3>
</item>
</Section1>
<Section2>
<OtherData>
<data1>A VALUE</data1>
<data2>A VALUE</data2>
<data3>A VALUE</data3>
</OtherData>
<OtherData>
<data1>A VALUE</data1>
<data2>A VALUE</data2>
<data3>A VALUE</data3>
</OtherData>
<OtherData>
<data1>A VALUE</data1>
<data2>A VALUE</data2>
<data3>A VALUE</data3>
</OtherData>
</section2>
</root>
Example:
Code: Select all
<root>
<Item>
<data1>A VALUE</data1>
<data2>A VALUE</data2>
<data3>A VALUE</data3>
</item>
</root>Thanks
Noodle