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