Skip to content
Permalink
Browse files

Fixing the documentation.

  • Loading branch information...
jrbasso committed Sep 7, 2010
1 parent c1a75cb commit ca7e327af182d4674c58d53e9e841e54d6f493a7
Showing with 4 additions and 3 deletions.
  1. +4 −3 cake/libs/xml.php
@@ -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').

0 comments on commit ca7e327

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