Following on from yesterdays post, you can also use SimpleXML to quickly create XML documents.

The example below creates a very short and basic XML document containing a list of cars that I would love to have in my dream garage (well, some of them anyway).

[snippet id=”131″]

The resulting XML looks like this.

[snippet id=”132″]

You can run this script here and you can view the output XML file here. The time in the “generated” node will be updated every time the script is run.