|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Converting xsd to xml
Hi,
Can anyone help me with creating an xsl that converts the following schema to xml given as below? I have done similar conversions before but this looks complicated ------------------------------------------------------ Schema <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Menu" type="Menu1" /> <xs:complexType name="Menu1"> <xs:sequence maxOccurs="unbounded"> <xs:element name="Title" type="xs:string" /> <xs:element name="Types" type="mTypeList" /> </xs:sequence> </xs:complexType> <xs:complexType name="mType"> <xs:sequence> <xs:element minOccurs="0" name="field1" /> <xs:element minOccurs="0" name="field2" /> <xs:element minOccurs="0" name="field3" /> </xs:sequence> </xs:complexType> <xs:complexType name="mTypeList"> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="Type" type="mType" /> </xs:sequence> </xs:complexType> </xs:schema> ------------------------------------------ Output xml <Menu> <Title></Title> <Types> <Type> <field1></field1> <field2></field2> <field3></field3> </Type> </Types> </Menu> ------------------------------------------ I greatly appreciate your help Thanks, gandev |
|
#2
|
|||
|
|||
|
Try having a look here URL
Last edited by denis@dlr : May 13th, 2003 at 09:20 AM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Converting xsd to xml |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|