Msg#: 4344441 posted 11:30 am on Jul 27, 2011 (gmt 0)
I am a web developer that been asked by a client to create a login and register system that uses XML to pulls data from a external server.
i know hmtl, php and php
the login and register system is for a loyalty card. i have already create the website. the client want the loyalty card holder to be able to go to the website click on the login button enter their card number and password then be taken to the next page that displays only their name, card number and points earned.
the client was given a xml codes to choose from, what do they want to display and they choose to displays only loyalty card holder name, card number and points earned.
that xml was given to them by the company that manages the loyalty card transactions.
example of xml code:
the code in code is the code that the client wants to pull out this is only some of the code provided Account History
I'm inclined to agree with the user comments at that tutsplus page. XML is not well suited for this job. Certainly it can be done, and grabbing strings from an XML file is simple using PHP's SimpleXML [php.net] interface. But - considering the potential size of the XML file, and how many loyalty cards there might potentially be, SQL is a better choice for this project.
Even if the raw data is provided in XML format, you'll be better off writing a parsing script that imports the XML data into SQL.
XML is an excellent data carrier format, and it's fantastic for small rendering jobs, transformation of XML data into HTML layouts, storage of hierarchical data fragments, cross-platform data transfer, configuration files. It is NOT good as a storage and retrieval format for large amounts of data, especially data that will need to be retrieved non-sequentially.
So, my first bit of advice is not how to follow that tutorial, but instead to tell you to throw away that tutorial and start this project using the best tools for the task.