florindaniel
Programmer
Hello,
If come back with an example of what happens when I
convert the XML (sorry for posting twice)
A piece of XSD
==============
<xs:element name="HealthDepartmentTypes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="ro">Catalogul de tipuri de departamente de sanatate</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="HealthDepartmentType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="ro">Definitia tipului de departament de sanatate</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence></xs:sequence>
<xs:attribute name="code" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="ro">Codul tipului de departament de sanatate</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="ro">Descrierea tipului de departament de sanatate</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="validFrom" type="xs:date" use="required">
<xs:annotation>
<xs:documentation xml:lang="ro">Data de inceput a valabilitatii</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="validTo" type="xs:date" use="optional">
<xs:annotation>
<xs:documentation xml:lang="ro">Data de sfârsit a valabilitatii</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="HealthDepartments" minOccurs="0">
The corresponding piece of XML
==============================
<HealthDepartmentTypes>
<HealthDepartmentType code="SECT" description="Sectie" validFrom="2007-01-01"/>
<HealthDepartmentType code="CAB" description="Cabinet" validFrom="2007-01-01"/>
<HealthDepartmentType code="LAB" description="Laborator" validFrom="2007-01-01"/>
<HealthDepartmentType code="COMP" description="Compartiment" validFrom="2007-01-01"/>
<HealthDepartmentType code="RAD" description="Radiologie" validFrom="2007-01-01"/>
<HealthDepartmentType code="FARM" description="Farmacie" validFrom="2007-01-01"/>
<HealthDepartmentType code="AMB" description="Ambulatoriu" validFrom="2007-01-01"/>
<HealthDepartmentType code="SEDIU" description="Sediu" validFrom="2007-01-01"/>
</HealthDepartmentTypes>
<HealthDepartments>
And the structure of the resulting table
========================================
Structure for table: HEALTHDEPARTMENTTYPE.DBF
Number of data records: 8
Date of last update: 05/10/10
Memo file block size: 64
Code Page: 1252
Field FieldName Type Width Dec Index Collate Nulls Next Step
1 CODE Memo 4 No
2 DESCRIPTION Memo 4 No
3 VALIDFROM Date 8 No
4 VALIDTO Date 8 Yes
**Total** 26
And the resulting table
=======================
CODE DESCRIPTION VALIDFROM VALIDTO
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Thank you
Daniel
If come back with an example of what happens when I
convert the XML (sorry for posting twice)
A piece of XSD
==============
<xs:element name="HealthDepartmentTypes" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="ro">Catalogul de tipuri de departamente de sanatate</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="HealthDepartmentType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="ro">Definitia tipului de departament de sanatate</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence></xs:sequence>
<xs:attribute name="code" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="ro">Codul tipului de departament de sanatate</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="ro">Descrierea tipului de departament de sanatate</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="validFrom" type="xs:date" use="required">
<xs:annotation>
<xs:documentation xml:lang="ro">Data de inceput a valabilitatii</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="validTo" type="xs:date" use="optional">
<xs:annotation>
<xs:documentation xml:lang="ro">Data de sfârsit a valabilitatii</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="HealthDepartments" minOccurs="0">
The corresponding piece of XML
==============================
<HealthDepartmentTypes>
<HealthDepartmentType code="SECT" description="Sectie" validFrom="2007-01-01"/>
<HealthDepartmentType code="CAB" description="Cabinet" validFrom="2007-01-01"/>
<HealthDepartmentType code="LAB" description="Laborator" validFrom="2007-01-01"/>
<HealthDepartmentType code="COMP" description="Compartiment" validFrom="2007-01-01"/>
<HealthDepartmentType code="RAD" description="Radiologie" validFrom="2007-01-01"/>
<HealthDepartmentType code="FARM" description="Farmacie" validFrom="2007-01-01"/>
<HealthDepartmentType code="AMB" description="Ambulatoriu" validFrom="2007-01-01"/>
<HealthDepartmentType code="SEDIU" description="Sediu" validFrom="2007-01-01"/>
</HealthDepartmentTypes>
<HealthDepartments>
And the structure of the resulting table
========================================
Structure for table: HEALTHDEPARTMENTTYPE.DBF
Number of data records: 8
Date of last update: 05/10/10
Memo file block size: 64
Code Page: 1252
Field FieldName Type Width Dec Index Collate Nulls Next Step
1 CODE Memo 4 No
2 DESCRIPTION Memo 4 No
3 VALIDFROM Date 8 No
4 VALIDTO Date 8 Yes
**Total** 26
And the resulting table
=======================
CODE DESCRIPTION VALIDFROM VALIDTO
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Memo Memo 01/01/07 .NULL.
Thank you
Daniel