how to retrieve the value of an enumeration type
I have registered an XSD schema (with gentypes = true) which contains an enumeration type like this:
...
<xsd:simpleType name="OperatoreLogico">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OR"/>
<xsd:enumeration value="AND"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="Richiesta_getListaPersoneFisiche">
<xsd:sequence>
<xsd:element name="nome" type="xsd:string" minOccurs="0"/>
<xsd:element name="cognome" type="xsd:string" minOccurs="0"/>
<xsd:element name="codicefiscale" type="xsd:string" minOccurs="0"/>
<xsd:element name="datanascita" type="xsd:date" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="operatoreLogico" type="OperatoreLogico" use="optional">
</xsd:attribute>
</xsd:complexType>
...
was successfully generated the object type:
TYPE "Richiesta_getListaPersoneFisiche"
AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T",
*"operatoreLogico" "XDB"."XDB$ENUM_T"*,
"nome" VARCHAR2(4000 CHAR),
"cognome" VARCHAR2(4000 CHAR),
"codicefiscale" VARCHAR2(4000 CHAR),
"datanascita" DATE) NOT FINAL INSTANTIABLE
Fill correctly the object from an xml valid for the schema using the function "toObject".
I can retrieve the values of all attributes of the object (objectName.attribute), but I do not know how to retrieve the value of the enumeration type (XDB$ENUM_T) "operatoreLogico".
I guess it's easy ...
Can anyone help me?
thanks
Stefano
Edited by: Stefano_i0600006 on 21-mag-2013 13.48