Although Data Formats has “Low emphasis” in the test, it’s quite important for you as a developer. In the latest year, every major website has API Access, and there about 5000 + of them listed on programmableweb only in Json format. Understanding Data Formats then it’s quite a must if you want to build something that “Talks” to other platforms.
Sections
- XML Extensible Markup Language
1 xml_parser_create() type constructor, to parse difficult XML data, like openimages Xml api
2 simplexml_* functions to work with simple Xml data from php
3 DOM permits manipulating XML documents
4 xpath() Method to perform queries agains XML.
Can work with simplexml FORMAT: array SimpleXMLElement::xpath(string $path) - SOAP Simple Object Access Protocol
This Php extension is used to write Soap Servers and Clients
They are runtime configuration variables and predefined constants that start with SOAP_* - REST REpresentational State Transfer
All the web is a giant REST model. Conceptually is a network of pages, accessed by users through a set of Links. Uses HTTP “verbs” :
GET List (no id) /Resource (needs an id)
POST Create
PUT Update (needs an id)
DELETE delete (needs an id) - JSON Javascript Object NotationJson is an data-interchange format. Is mostly used to pass data from Php to javascript and the extension is loaded in Php by default.
The functions start with json_* being the most used: json_decode($json) & json_encode
Date and time
The date functions retrieve the date and time where the php server is running.
REFERENCES:
http://us2.php.net/manual/en/book.xml.php
http://us2.php.net/manual/en/book.dom.php
http://php.net/manual/en/refs.webservice.php
http://us.php.net/manual/en/book.json.php
http://php.net/datetime
http://php.net/simplexml
http://php.net/domxpath
http://php.net/soap