By default the Source Generator will output descriptor classes.
 
Trying look into the methods on your FormatDescriptor class.
 
Note that the names are also defined as public static final's so that you can refer to them statically aswell.
 
Cheers.
-----Original Message-----
From: Rudra [mailto:[EMAIL PROTECTED]]
Sent: 07 December 2002 00:10
To: [EMAIL PROTECTED]
Subject: [castor-dev] How to get the name of elements in this xml?

Schema:
<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
    <xsd:element name = "Format">
        <xsd:complexType>
            <xsd:sequence maxOccurs = "unbounded">
                <xsd:element name = "GIF" type = "xsd:string"/>
                <xsd:element name = "JPEG" type = "xsd:string"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>
 
XML Document:
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<Format>
    <GIF />
    <JPEG />
</Format>
 
Question:
I need to get the name of elements under the "Format" element(Such as GIF or JPEG).
When castor generates classes for this schema, it is creating a Format class
which has getFormatItem(int) & getFormatItem() functions.
Inside the FormatItem class, I don't have any method to get the name of the element.
 
How do i Get the name of the element under the Format element?
 
Thanks,
Rudra
 

Reply via email to