is there a way, to "tell" the PEAR XML_Serializer, which properties it should serialize as attribute and which as sub element?
For example:
class User {
public $id;
public $name;
public $address;
}
Should be serialized like this:
<User id="0">
<name>John Doe</name>
<address></address>
</User>
I thought about using the "XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES" Option, but unfortunately, I need some scalars as attribute and some as sub element.
Is there a way to tell the XML_Serializer how he should serialize the properties of the source class?