Attributes to customize XML serialization / Mapping between simple 4GL and XML data types detail |
Map a 4GL simple data type to an XML Element.
DEFINE myVar RECORD ATTRIBUTE(XMLName="Root") val1 INTEGER ATTRIBUTE(XMLElement, XSDunsignedShort, XMLName="Val1"), rec RECORD ATTRIBUTE(XMLName="Rec") val2 FLOAT ATTRIBUTE(XMLElement, XMLName="Val2"), val3 STRING ATTRIBUTE(XMLElement, XMLName="Val3") END RECORD END RECORD
<Root> <Val1>148</Val1> <Rec1> <Val2>25.8</Val2> <Val3>Hello world</Val3> </Rec1> </Root>