Hello, I have an XML file of about 200K lines (Thats total of about 70K childs in 500 containers) as shown in the following format <container1> <property1> <property2> <child1> <property1> <property2> </child1> <child2> <property1> <property2> </child2> .... </container1> <container2> <property1> <property2> <child1> <property1> <property2> </child1> <child2> <property1> <property2> </child2> .... </container2> Code (markup): I need to make some sort of script that will 'quickly' get me any value from that file. My question is.. Shall i do some super-puper PHP class that will smartly get what i want.. OR .. Shall i do a script to dump that into a database which will be easier to search.. OR.. suiggest me something please. I am lost as the ampount of data there shall kill almost any server. Good luck and TIA, Ruslan
I'd probably write a script to put it in a database. Even mysql could handle the size. From there you can deal with it in pieces or anything else you want. Do you know what the file size is if it were a flat text file?
Hello.. Yeah thats 6.19 MB (6,492,160 bytes) exactly, no tabs or etc.. I am already on writing the parser script. It is working ok but i have doubtsa that it will timeout on most shared hosting servers because of safemode and/or memory limitations.. don't you think so? Thanks again, Ruslan
Do you have a web server running in your home/office? If so you can parse the XML there, do a SQL dump then import THAT into your shared hosting DB without worrying about time/memory limitations.