You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by chakresh bhandari <bh...@gmail.com> on 2008/12/23 08:00:09 UTC

Schema parsing query

Hi,

I want to use Xerces C++ Parser for validating and parsing schema. For this
I am referring to SCMPrint sample application.
Now here we use processElements method that prints all the elements present
in the schema. My question is, Is there any method available that give me
all the elements present under other element.

For instance, if I have following schema..

<xsd:element name="abc">
     <xsd:complexType>
        <xsd:sequence>
           <xsd:element ref="x1" minOccurs="0" />
           <xsd:element ref="x2" minOccurs="0" />
           <xsd:element ref="x3" minOccurs="0" />
        </xsd:sequence>
     </xsd:complexType>
</xsd:element>

<xsd:element name="x1" type="xsd:string" />
<xsd:element name="x2" type="xsd:integer" />
<xsd:element name="x3" type="OLI_LU_AGEBASIS" />

I want to retrieve all the elements that comes under element "abc", Is there
any api available to retrieve this information?

Let me know if I am missing any thing. Thanks in advance

Regards
Chakresh