Skip to content

Commit

Permalink
Merge pull request cakephp#2225 from alecho/patch-4
Browse files Browse the repository at this point in the history
minor language readability changes
  • Loading branch information
bcrowe committed Jan 5, 2015
2 parents 558b418 + e672f53 commit d078fc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions en/core-utility-libraries/xml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ Xml

.. php:class:: Xml
The Xml class was all refactored. As PHP 5 have
The Xml class was all refactored. As PHP 5 has
`SimpleXML <http://php.net/simplexml>`_ and
`DOMDocument <http://php.net/domdocument>`_, the CakePHP doesn't need to
re-implement an XML parser. The new XML class will basically transform an array
`DOMDocument <http://php.net/domdocument>`_, CakePHP doesn't need to
re-implement an XML parser. The new XML class will transform an array
into SimpleXMLElement or DOMDocument objects, and vice versa.


Importing data to Xml class
===========================

In CakePHP 1.3 you can pass array, XML as string, URL or file path to the
constructor of Xml class to import data. In CakePHP 2.0 you can do it using
constructor of the Xml class to import data. In CakePHP 2.0 you can do it using
:php:meth:`Xml::build()`. Unless the return is an Xml object, it will return a
SimpleXMLElement or DOMDocument object (depending of your options parameter -
default is SimpleXMLElement). Below the samples how to import data from URL::
Expand Down

0 comments on commit d078fc6

Please sign in to comment.