XML Serialization Attributes
Here’s the list of attributes that affect XML serialization. They should be properly supported by all target languages.
Attribute |
Type |
Inheritance |
Target |
Description |
Default |
|---|---|---|---|---|---|
xml.enabled |
bool |
scope |
module,
type
|
|
|
xml.ordered |
bool |
scope |
record
|
whether serialized record fields
are required to be in strict
order or not
|
|
xml.ignore |
bool |
record field
|
exclude record field from XML
serialization
|
|
|
xml.attribute |
bool |
record field
|
serialize field as XML attribute |
|
|
xml.text |
bool |
record field
union clause
|
serialize value as XML element
text
|
|
|
xml.content |
bool |
record field
union clause
|
serialize value as XML element
content (without enclosing tag)
|
|
|
xml.notation |
scope |
record field
enum field
|
Notation used for name
translation of record and enum
field names into XML strings
|
|
|
xml.enum_notation |
scope |
enum field |
Notation used for name
translation of enum values
|
xml.notation |
|
xml.element_notation |
scope |
any |
Notation used for name
translation of element names
|
xml.notation |
|
xml.attribute_notation |
scope |
any |
Notation used for name
translation of attribute names
|
xml.notation |