Attributes to customize XML serialization / Mapping between simple 4GL and XML data types detail |
Map a 4GL Record type definition to an XML Schema complexType.
TYPE mycomplextype RECORD ATTRIBUTE(XSComplexType, XSTypeName="MyComplexType",XSTypeNamespace="http://tempuri.org") name DYNAMIC ARRAY ATTRIBUTE(XMLList) OF RECORD ATTRIBUTE(XMLSequence="nested") firstname STRING ATTRIBUTE(XMLName="FirstName"), lastname STRING ATTRIBUTE(XMLName="LastName") END RECORD, date DATE ATTRIBUTE(XMLAttribute,XMLName="Date") END RECORD
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org" elementFormDefault="qualified" > <xsd:complexType name="MyComplexType"> <xsd:sequence maxOccurs="unbounded"> <xsd:element name="FirstName" type="xsd:string" /> <xsd:element name="LastName" type="xsd:string" /> </xsd:sequence> <xsd:attribute name="Date" type="xsd:date" use="required"/> </xsd:complexType> </xsd:schema>