Skip to content
Permalink
Browse files

Updating docs.

  • Loading branch information...
jrbasso committed Sep 12, 2010
1 parent 7237713 commit a006ee0019a86b13be4007bbe4971e461ff53d8d
Showing with 12 additions and 2 deletions.
  1. +12 −2 cake/libs/xml.php
@@ -23,14 +23,18 @@
class Xml {
/**
* Initialize SimpleXMLElement from a given XML string, file path, URL or array.
* Initialize SimpleXMLElement or DOMDocument from a given XML string, file path, URL or array.
*
* ### Usage:
*
* Building XML from a string:
*
* `$xml = Xml::build('<example>text</example>');`
*
* Building XML from string (output DOMDocument):
*
* `$xml = Xml::build('<example>text</example>', array('return' => 'domdocument'));`
*
* Building XML from a file path:
*
* `$xml = Xml::build('/path/to/an/xml/file.xml');`
@@ -61,8 +65,14 @@ class Xml {
*
* When building XML from an array ensure that there is only one top level element.
*
* ### Options
*
* - `return` Can be 'simplexml' to return object of SimpleXMLElement or 'domdocument' to return DOMDocument.
* - If using array as input, you can pass `options` from Xml::fromArray.
*
* @param mixed $input XML string, a path to a file, an URL or an array
* @return object SimpleXMLElement
* @param array $options The options to use
* @return object SimpleXMLElement or DOMDocument
* @throws Exception
*/
public static function build($input, $options = array()) {

0 comments on commit a006ee0

Please sign in to comment.
You can’t perform that action at this time.