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)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.