Jump to content

XML writting method... which one should I use?


Jerred121

Recommended Posts

I have a massive form (300+ fields) submitting post data that I wish to write to an xml.  The hierarchy will vary from node to node ie:

 

<E02>
  <E02_02>value</E02_02>
  <E02_03>value</E02_03>
  <E02_04_0>
    <E02_04>value</E02_04>
    <E02_05>value</E02_05>
  </E02_04_0>
</E02>

 

I'm not sure how necessary that example was, but anyways...  The nodes and the data in them will be different all of the time, I plan to deal with the structural differences with a really big switch/case.  So my questions are:

 

1) Whats is the advantage of using something like simplexml to write the xml, as apposed to just writing it out in a string, and saving it as a .xml file?

 

2) If I shouldn't write it out as a string, what method would you guys suggest, keep in mind there will be a lot of values to store, in many different parent elements (xml->emdata->header->record->E02->E02_04_0->E02-02)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.