Hi,
I am developing a website with users using some XML.
I would like to know what is the best and must optimized way to read and write XML with PHP. Currently I made some test with " new DOMDocument();" it work well but is it the best way to do it?
And is it best to read a big XML that contain many info or to split it in many little XML that contain less info, and to read them one after the other?
And do you have any good tips of PHP optimizations, what not to do or use and what to make to optimize.
One last question, what happen if a user must update an XML and at the same time an other user must write in the same XML? It will create a conflict, anyone have ideas to solve that problem?
Thank you
PHP and XML
Moderator: General Moderators
Re: PHP and XML
Have a look at the php simple xml functions, they're pretty good for rapidly parsing and sorting through xml strings and files. Is your xml stored as static files or database entries?
Re: PHP and XML
My XML are not static the entries change all the time. They are created by the data in a database.
That is why I want to know what to do to solve the problem, if two users update, read or write in the same XML file at the same time.
That is why I want to know what to do to solve the problem, if two users update, read or write in the same XML file at the same time.