Attributes to customize XML serialization / Mapping between simple 4GL and XML data types detail |
Define the default namespace of all members of a record also defined as XML attributes.
DEFINE myVar RECORD ATTRIBUTE(XMLName="Root", XMLNamespace="http://tempuri.org", XMLAttributeNamespace="http://www.mycompany.com") val1 FLOAT ATTRIBUTE(XMLElement,XMLName="Val1"), val2 INTEGER ATTRIBUTE(XMLElement,XMLName="Val2"), attr1 STRING ATTRIBUTE(XMLAttribute,XMLName="Attr1"), attr2 DATE ATTRIBUTE(XMLAttribute, XMLName="Attr2",XMLNamespace="http://anyuri.org"), END RECORD
<fjs1:Root xmlns:fjs1="http://tempuri.org" fjs2:Attr1="Hello" xmlns:fjs2="http://www.mycompany.com" xmlns:fjs3="http://anyuri.org" fjs3:Attr2="2006-06-24"> <fjs1:Val1>0.5</fjs1:Val1> <fjs1:Val2>-18547</fjs1:Val2> </fjs1:Root>