John Wards
|
73cd26e2ca
|
[Serializer] added the ability to add attributes to nodes using an array key begining with @
Example:
array(
'foo-bar' => array(
'@id' => 1,
'@name' => 'Bar'
),
Foo' => array(
'Bar' => "Test",
'@Type' => 'test'
)
)
Parse XML now creates @ attribites for the array.
$rss = array(
"channel" => array(
"title" => "Test RSS",
"description" => "Test description",
"item" => array(
0 => array(
"title" => "Test Title 1",
"link" => "http://foo.com"
),
1 => array(
"title" => "Test Title 2",
"link" => "http://bar.com"
)
)
)
);
<channel>
<title>Test RSS</title>
<description>Test description</description>
<item>
<title>Test Title 1</title>
<link>http://foo.com</link>
</item>
<item>
<title>Test Title 2</title>
<link>http://bar.com</title>
</item>
</channel>
|
2011-02-14 22:20:03 +01:00 |
|