AW: AW: [PEAR-DEV] Re: [RfC] XML_Serializer
| From: | Stephan Schmidt | Date: | Wed, 30 Jul 2003 17:58:28 +0000 |
| Subject: | AW: AW: [PEAR-DEV] Re: [RfC] XML_Serializer | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18967@lists.php.net to get a copy of this message | ||
Hi,
> The Config package can already convert a PHP array to XML and
> back. Could you please summarize for me what new features
> your package brings.
Advantages of XML_Serializer:
- it's easier to use. Just call one method and hand over the structure
to serialize. Why should I have to use something generic like Config,
when I want to create an RDF document from an array?
- it's able to serialize an object.
- it's able to add type hints that can be used to unserialize, afaik all
config values are strings when using PEAR::Config
- it's generating valid XML, as it replaces &, ", <, > and '. When using
these chars with Config, they will not be replaced by entities and thus
the config file can't be read again... Because of this problem I
suggested to release XML_Util (or maybe called XML) which supplies
methods to generate valid XML...
- it's possible to change/switch off indentation
Basically it's more flexible and has a simpler API, as it's only used to
generate XML and not various filetypes.
> It might be worth having a look at
> Config and let me know what you think, and if Config could
> use your serializer in the future...
You could definitely use XML (or XML_Util) and maybe also XML_Serializer
in future versions of Config.
So I hope I get your +1 for XML_Serializer and XML (or XML_Util) and
also a vote for one of the possible names for the XML package.
Stephan