Skip to content

Commit

Permalink
Fixing the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Sep 7, 2010
1 parent c1a75cb commit ca7e327
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cake/libs/xml.php
Expand Up @@ -88,19 +88,20 @@ public static function build($input) {
* 'root' => array(
* 'tag' => array(
* 'id' => 1,
* 'value' => 'defect'
* 'value' => 'defect',
* '@' => 'description'
* )
* )
* );
* }}}
*
* Calling `Xml::fromArray($value, 'tags');` Will generate:
*
* `<root><tag><id>1</id><value>defect</value></tag></root>`
* `<root><tag><id>1</id><value>defect</value>description</tag></root>`
*
* And calling `Xml::fromArray($value, 'attribute');` Will generate:
*
* `<root><tag id="1">defect</tag></root>`
* `<root><tag id="1" value="defect">description</tag></root>`
*
* @param array $input Array with data
* @param string $format If create childs ('tags') or attributes ('attribute').
Expand Down

0 comments on commit ca7e327

Please sign in to comment.