I have a web document created by a script and instead of going back to
the db I choose to either create an array to iterate through or xml to
parse through.
So, my question is: What are the trade offs between using an array to
load data from or an xml structure?
My array would look like:
myarray = [[],[],[],[]]
My xml like:
<xml>
<data>
<a></a><b></b>
</data>
</xml>
I would use js to iterate or getElementByTag Name to find data.
I am thinking the page would load faster using xml, and then the user
may not even use that functionality. In all cases I have to load the
array to memory.
Thoughts?
the db I choose to either create an array to iterate through or xml to
parse through.
So, my question is: What are the trade offs between using an array to
load data from or an xml structure?
My array would look like:
myarray = [[],[],[],[]]
My xml like:
<xml>
<data>
<a></a><b></b>
</data>
</xml>
I would use js to iterate or getElementByTag Name to find data.
I am thinking the page would load faster using xml, and then the user
may not even use that functionality. In all cases I have to load the
array to memory.
Thoughts?
Comment