PHP
PHP is a widely-used general-purpose scripting language for web development and can be embedded into HTML.
PHP’s SimpleXML
SimpleXML is a PHP library extension available from PHP 5+. It enables PHP to easily access the data and structure of an SML document.
Previously DOM and DOM XML were used by PHP developers to parse XML. DOM and DOM XML requires tens of commands to do what what SimpleXML can do in a couple of lines. Furthermore, unlike DOM and DOM XML, SimpleXML creates a PHP onject which requires many fewer commands to access, read and write to the XML document structure.
The SimpleXML document needs to be created before and, if manipulated, re-created before it can be parsed using PHP. An XML document can be created from scratch using a simple PHP string..
$string = ""; $xmObject = simplexml_load_string($string);
Alternatively, a pre-created XML document can be used to create an object from file…
$xmlObject = simplexml_load_file('test.xml');
Once the script has made its additions/changes to the object, it can be exported back as XML using the following command…
$xml = new SimpleXMLElement($xmlObject);
That’s pretty much it.
PHP Server-side Scripting
PHP is a free, open-source imperative, object-oriented scripting language. PHP code can be embedded in HTML and is executed on the server-side, avoiding the need for specialist client-side technologies. PHP is a widely used technology and is used on many web development projects. Many current systems use either PHP or alternatives to execute on the server working with a database.

As you can see in the diagram above, PHP is executed on the server. This means that functions are executed before a standard HTML document is generated and sent to the client. If required the PHP interpreter will also carry out MySQL Queries to get information required to generate a page for the client.
Alternatives to PHP included Microsoft’s ASP (Active Server Pages) which can be used in much the same way. It requires a Windows-based server with Microsoft’s IIS (Internet Information System) installed. Functionally there is little differentiating ASP from PHP, however, ASP, IIS and Windows are all proprietary software and therefore add additional costs to the implementation of an ASP-based system. PHP is free and can be run on most server Operating Systems including Windows and the open-source Linux operating systems.
















