diff --git a/cake/libs/xml.php b/cake/libs/xml.php
index 570a8ab4cb4..f3153b2e49c 100644
--- a/cake/libs/xml.php
+++ b/cake/libs/xml.php
@@ -23,7 +23,7 @@
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:
*
@@ -31,6 +31,10 @@ class Xml {
*
* `$xml = Xml::build('text');`
*
+ * Building XML from string (output DOMDocument):
+ *
+ * `$xml = Xml::build('text', 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()) {