Commit Graph

15 Commits

Author SHA1 Message Date
Jordi Boggiano
3e64d36cbd [Serializer] Fix XML decoding attack vector through external entities 2012-02-24 22:50:04 +01:00
Lukas Kahwe Smith
2b4a25a0a7 fix tests 2011-06-10 01:11:51 +02:00
Fabien Potencier
17cd08dc6c fixed CS 2011-06-08 19:56:59 +02:00
Brouznouf
5712b3bd0e [Serializer] [XmlEncoder] Add unit test for decoding / encoding root with attributes 2011-04-27 22:16:24 +02:00
Brikou CARRE
e898445b94 removed empty lines/trailing spaces 2011-04-15 21:12:02 +02:00
Brouznouf
8e6233e9c2 [Serializer] Using DOMElement instead of SimpleXmlElement in XmlEncoder to permit some behavior 2011-04-12 00:58:21 +02:00
Fabien Potencier
cb62fde8c9 [Serializer] fixed some tests that were failing on the CI server 2011-03-23 20:27:58 +01:00
Fabien Potencier
411a382d80 [Serializer] fixed XmlEncoder for single char tags 2011-03-12 15:23:30 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
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
Jordi Boggiano
f5f41696ec [Serializer] Allow for more flexible element names 2011-02-13 17:47:22 +01:00
Jordi Boggiano
8216a6ef3d [Serializer] Added XmlEncoder::setRootNodeName 2011-02-13 17:47:22 +01:00
Fabian Vogler
9bf845bc51 Test for SimpleXML encode 2011-02-12 21:54:27 +01:00
Bulat Shakirzyanov
5252d3aef0 [Serializer] switched to setEncoder, to be consistent with getEncoder 2011-01-28 18:24:34 +01:00
Jordi Boggiano
005c1d9df8 [Serializer] Added initial version of the Serializer component 2011-01-23 12:34:47 +01:00