www.webdeveloper.com
Results 1 to 2 of 2

Thread: xml shema and classes

  1. #1
    Join Date
    Sep 2009
    Posts
    3

    xml shema and classes

    I have this block of an xml schema (.xsd).
    Code:
    <xs:element substitutionGroup="ifc:IfcConstructionResource" name="IfcConstructionMaterialResource" nillable="true" type="ifc:IfcConstructionMaterialResource"> </xs:element>
    	<xs:complexType name="IfcConstructionMaterialResource">
    		<xs:complexContent>
    			<xs:extension base="ifc:IfcConstructionResource">
    				<xs:sequence>
    					<xs:element name="Suppliers" minOccurs="0" nillable="true">
    						<xs:complexType>
    							<xs:group ref="ifc:IfcActorSelect" maxOccurs="unbounded"> </xs:group>
    							<xs:attribute ref="ex:itemType" fixed="ifc:IfcActorSelect"> </xs:attribute>
    							<xs:attribute ref="ex:cType" fixed="set"> </xs:attribute>
    							<xs:attribute use="optional" ref="ex:arraySize"> </xs:attribute>
    						</xs:complexType>
    					</xs:element>
    					<xs:element name="UsageRatio" minOccurs="0" type="ifc:IfcRatioMeasure" nillable="true"> </xs:element>
    				</xs:sequence>
    			</xs:extension>
    		</xs:complexContent>
    	</xs:complexType>
    i wish create a c++ class for each element , but how i can manage the nested <xs:element ></xs:element> that are without type attribute?
    From an object prospective What's are these nested element?
    like
    Code:
    				<xs:element name="Suppliers" minOccurs="0" nillable="true">
    						<xs:complexType>
    							<xs:group ref="ifc:IfcActorSelect" maxOccurs="unbounded"> </xs:group>
    							<xs:attribute ref="ex:itemType" fixed="ifc:IfcActorSelect"> </xs:attribute>
    							<xs:attribute ref="ex:cType" fixed="set"> </xs:attribute>
    							<xs:attribute use="optional" ref="ex:arraySize"> </xs:attribute>
    						</xs:complexType>
    					</xs:element>
    1)members variables?
    2)nested classes?

    ???
    Thanks.

  2. #2
    Join Date
    May 2011
    Posts
    4
    Extensible Markup Language (XML) is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification[4] produced by the W3C, and several other related specifications, all gratis open standards.[5]
    The design goals of XML emphasize simplicity, generality, and usability over the Internet.[6] It is a textual data format with strong support via Unicode for the languages of the world. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services.
    Many application programming interfaces (APIs) have been developed that software developers use to process XML data, and several schema systems exist to aid in the definition of XML-based languages.


    thanks,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles