Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to retrieve the value of an enumeration type

Stefano_i0600006May 21 2013 — edited May 22 2013
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2013
Added on May 21 2013
8 comments
3,283 views