|
Hello. I'm new to xml and i have a big problem. How to generate an xml sample document from this schema ?
<xs:schema targetNamespace="http://www.csi.it/sigit/sigitweb/xml/import" elementFormDefault="qualified" attributeFormDefault="unqualified"><!-- ELENCO IMPIANTI --><xs:element name="ElencoImpianti"></xs:element><!-- ******************************* --><!-- DEFINIZIONE SEZIONI --><!-- ******************************* --><!-- IMPIANTO --><xs:element name="Impianto"></xs:element><!-- ******************************* --><!-- DEFINIZIONE TIPI COMPLESSI --><!-- ******************************* --><!-- MANUTENTORE --><xs:element name="Manutentore"></xs:element><!-- IDENTIFICAZIONE IMPIANTO --><xs:element name="IdentificazioneImpianto"></xs:element><!-- ELENCO RESPONSABILI --><xs:complexType name="ElencoResponsabili"></xs:complexType><!-- RESPONSABILE --><xs:element name="Responsabile"></xs:element><!-- ELENCO EDIFICI --><xs:complexType name="ElencoAltriEdifici"></xs:complexType><!-- ALTRI EDIFICI --><xs:element name="AltriEdifici"></xs:element><!-- ELENCO APPARECCHIATURE --><xs:complexType name="ElencoApparecchiature"></xs:complexType><!-- APPARECCHIATURA --><xs:element name="Apparecchiatura"></xs:element><!-- ELENCO ALLEGATOG --><xs:complexType name="ElencoAllegatoG"></xs:complexType><!-- ALLEGATOG --><xs:element name="AllegatoG"></xs:element><!-- ELENCO ALLEGATOF --><xs:complexType name="ElencoAllegatoF"></xs:complexType><!-- ALLEGATOF --><xs:element name="AllegatoF"></xs:element><xs:element name="ElencoPagine"></xs:element><!-- PAGINA ALLEGATOF --><xs:element name="Pagina"></xs:element></xs:schema>
I browser some tips/tricks and read some tutorials, but i don t get the way it works an xml file without having a root element, but having 5 global elements?
Thanks in advance!
|
|
|
|
|
I tried to import the schema into VS 2010 and Excel and both say not a valid schema. So the answer is you can't generate a sample document from the schema and you should go to the source and get a corrected one.
|
|
|
|
|
If there is no root, you do not have a valid document. I think you are confusing the XML declaration with the root -- the root is the first element that is NOT the XML declaration...what you have posted -- is an XML schema fragment.
|
|
|
|