cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when trying to load an XML document with DTD or XML SCHEMA

Former Member
0 Kudos

Hello

I have tried to load an XML document in Data Services, and I created the xsd file and Dtd file. (With altova xml spy software automatically) to import into SAP Data Services 3.2. .

In Data Services I created the dtd import file DTD and then called the XML file from the DTD (the xml file is validated vs the dtd file), and I could not read the xml correctly because it tells me that an ELEMENT called <item> expected joiners who did not come in the structure of import (dtd), but if the xml.

I understand that the document root is the label: CUSTOMER_FULL_2014, the data flow is as follows:CARGA_XML_CUSTOMER |

Turns out the joiners element is used to separate the xml elements are repeated, but is used at different levels. My idea is that the design will dtd second, or something I'm missing or is incorrectly stated.

Thank you.

xml

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<?xml version="1.0" encoding="utf-8"?>

<CUSTOMER_FULL_2014>

  <item>

  <CUST_NO>202222</CUST_NO>

  <ADDRESS>

  <item>

  <SHIP_TO>202222</SHIP_TO>

  <NAME1>Henley.</NAME1>

  <STREET>Vitacura #40</STREET>

  <CITY>LIMA</CITY>

  </item>

  </ADDRESS>

  <EQUIPMENT>

  <item>

  <EQUI_NO>81623</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>81633</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>81993</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>82003</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>82013</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>82103</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>82113</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>581203</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>900003-EMER</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>9000033-STOCK</EQUI_NO>

  </item>

  </EQUIPMENT>

  <STORAGE_LOC>

  <item>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  </item>

  <item>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 henley</DESCRIPTION>

  </item>

  </STORAGE_LOC>

  </item>

  <item>

  <CUST_NO>2007933434343</CUST_NO>

  <ADDRESS>

  <item>

  <SHIP_TO>2007933434343</SHIP_TO>

  <NAME1>Campos de Almacenaje SA</NAME1>

  <STREET>Calacoto2, Calle 1</STREET>

  <HOUSE_NO>Piso 1</HOUSE_NO>

  <CITY>La Paz</CITY>

  </item>

  </ADDRESS>

  <EQUIPMENT>

  <item>

  <EQUI_NO>90000-EMER</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>90000333-STOCK</EQUI_NO>

  </item>

  </EQUIPMENT>

  <STORAGE_LOC>

  <item>

  <STOR_LOC_NO>00012</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  </item>

  <item>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 henley</DESCRIPTION>

  </item>

  </STORAGE_LOC>

  </item>

  <item>

  <CUST_NO>200801333</CUST_NO>

  <ADDRESS>

  <item>

  <SHIP_TO>200801333</SHIP_TO>

  <NAME1>CONSTRUCTORA SA.</NAME1>

  <STREET>Ruta Panamericana Km 100</STREET>

  <CITY>San Antonio 23</CITY>

  </item>

  </ADDRESS>

  <EQUIPMENT>

  <item>

  <EQUI_NO>1507933</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>1509733</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>90000-EMER</EQUI_NO>

  </item>

  <item>

  <EQUI_NO>90000333-STOCK</EQUI_NO>

  </item>

  </EQUIPMENT>

  <STORAGE_LOC>

  <item>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  </item>

  <item>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 henley</DESCRIPTION>

  </item>

  </STORAGE_LOC>

  </item>

</CUSTOMER_FULL_2014>

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ARCHIVO DTD CREADO (automáticamente con xml spy)

<?xml version="1.0" encoding="UTF-8"?>

<!-- DTD generado con XMLSpy v2014 rel. 2 (x64) (http://www.altova.com) -->

<!ELEMENT CITY (#PCDATA)>

<!ELEMENT item ((SHIP_TO, NAME1, STREET, HOUSE_NO?, CITY) | (CUST_NO, ADDRESS, EQUIPMENT, STORAGE_LOC) | (STOR_LOC_NO, DESCRIPTION) | EQUI_NO)>

<!ELEMENT NAME1 (#PCDATA)>

<!ELEMENT STREET (#PCDATA)>

<!ELEMENT ADDRESS (item)>

<!ELEMENT CUST_NO (#PCDATA)>

<!ELEMENT EQUI_NO (#PCDATA)>

<!ELEMENT SHIP_TO (#PCDATA)>

<!ELEMENT HOUSE_NO (#PCDATA)>

<!ELEMENT EQUIPMENT (item+)>

<!ELEMENT DESCRIPTION (#PCDATA)>

<!ELEMENT STORAGE_LOC (item+)>

<!ELEMENT STOR_LOC_NO (#PCDATA)>

<!ELEMENT CUSTOMER_FULL_2014 (item+)>

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The error of MONITOR Data Services

116765184XML-24010811-04-2014 17:34:16|Data flow CARGA_XML_CUSTOMER|Reader READ MESSAGE customer OUTPUT(customer)
116765184XML-24010811-04-2014 17:34:16An element named <item> present in the XML data input does not exist in the XML format used to set up this XML source in data
116765184XML-24010811-04-2014 17:34:16flow <CARGA_XML_CUSTOMER>. Please validate your XML data.
116765184XML-24030711-04-2014 17:34:16|Data flow CARGA_XML_CUSTOMER|Reader READ MESSAGE customer OUTPUT(customer)
116765184XML-24030711-04-2014 17:34:16XML parser failed: See previously displayed error message.

The Error from Monitor

The metadata DTD

Thanks

Juan

Accepted Solutions (0)

Answers (1)

Answers (1)

akhileshkiran
Contributor
0 Kudos

Hi ,

There is a problem with generated DTD file. Use correct Root Element.

Please make sure your DTD & XML files schema is same and in nested format like below screen.

Regards,

Akhileshkiran.

Former Member
0 Kudos

thank you Akhileshkiran,

within the xml document I have several labels called <item>, and does not allow me to declare them all, because I can only declare a joiners in the DTD file. The view es flat, not nested.

But when importing a structure through. Xsd (xml schema) if nesting makes me content.

Under new photo of schema xml, dtd nested I could send it so I commented

but the application requires me the ITEM field is an input field, not a nested table as shown in the picture

then the information unnest (item, ADDRESS, EQUIPMENT, STORAGE, LOC)

Thanks

the xsd (SCHEMA XML)

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:element name="CUSTOMER_FULL">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="item">

    <xs:complexType>

      <xs:sequence>

        <xs:sequence minOccurs="0">

          <xs:element ref="CUST_NO"/>

          <xs:element ref="ADDRESS"/>

          <xs:element ref="SHIP_TO"/>

          <xs:element ref="NAME1"/>

          <xs:element ref="STREET"/>

        </xs:sequence>

        <xs:element minOccurs="0" ref="HOUSE_NO"/>

        <xs:element minOccurs="0" ref="CITY"/>

        <xs:choice minOccurs="0">

          <xs:element ref="EQUIPMENT"/>

          <xs:element ref="STORAGE_LOC"/>

        </xs:choice>

        <xs:choice minOccurs="0">

          <xs:element ref="EQUI_NO"/>

          <xs:sequence>

            <xs:element ref="STOR_LOC_NO"/>

            <xs:element ref="DESCRIPTION"/>

          </xs:sequence>

        </xs:choice>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="CUST_NO" type="xs:integer"/>

  <xs:element name="ADDRESS">

    <xs:complexType>

      <xs:sequence>

        <xs:element ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="SHIP_TO" type="xs:integer"/>

  <xs:element name="NAME1" type="xs:string"/>

  <xs:element name="STREET" type="xs:string"/>

  <xs:element name="HOUSE_NO" type="xs:string"/>

  <xs:element name="CITY" type="xs:string"/>

  <xs:element name="EQUIPMENT">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="STORAGE_LOC">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="EQUI_NO" type="xs:NMTOKEN"/>

  <xs:element name="STOR_LOC_NO" type="xs:integer"/>

  <xs:element name="DESCRIPTION" type="xs:string"/>

</xs:schema>

Thanks

akhileshkiran
Contributor
0 Kudos

Hi ,

When i was trying to open your source XML and XSD file or with DTD.

There was some problem with your XSD Schema. I was unable to see the source data in Hierarchical format.

If possible can you share me your Source file in the attachment, So that i can resolve your error.

Regards,

Akhileshkiran

Former Member
0 Kudos

HI

the schema is:

------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:element name="CUSTOMER_FULL_20140207_033015_001">

    <xs:complexType>

      <xs:choice maxOccurs="unbounded">

        <xs:element ref="ADDRESS"/>

        <xs:element ref="CUST_NO"/>

        <xs:element ref="EQUIPMENT"/>

        <xs:element ref="STORAGE_LOC"/>

      </xs:choice>

    </xs:complexType>

  </xs:element>

  <xs:element name="ADDRESS">

    <xs:complexType>

      <xs:sequence>

        <xs:element ref="SHIP_TO"/>

        <xs:element ref="NAME1"/>

        <xs:element ref="STREET"/>

        <xs:element minOccurs="0" ref="HOUSE_NO"/>

        <xs:element ref="CITY"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="SHIP_TO" type="xs:integer"/>

  <xs:element name="NAME1" type="xs:string"/>

  <xs:element name="STREET" type="xs:string"/>

  <xs:element name="HOUSE_NO" type="xs:string"/>

  <xs:element name="CITY" type="xs:string"/>

  <xs:element name="CUST_NO" type="xs:integer"/>

  <xs:element name="EQUIPMENT">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="EQUI_NO"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="EQUI_NO" type="xs:NMTOKEN"/>

  <xs:element name="STORAGE_LOC">

    <xs:complexType>

      <xs:choice maxOccurs="unbounded">

        <xs:element ref="DESCRIPTION"/>

        <xs:element ref="STOR_LOC_NO"/>

      </xs:choice>

    </xs:complexType>

  </xs:element>

  <xs:element name="DESCRIPTION" type="xs:string"/>

  <xs:element name="STOR_LOC_NO" type="xs:integer"/>

</xs:schema>

the xml document is:

<?xml version="1.0" encoding="utf-8"?>

<CUSTOMER_FULL_20140207_033015_001>

  <CUST_NO>200530</CUST_NO>

  <ADDRESS>

  <SHIP_TO>903533</SHIP_TO>

  <NAME1>HENLEY - PART MAQUINARIAS S.A.</NAME1>

  <STREET>Dean Camilo # 148, San Carlos</STREET>

  <CITY>LIMA</CITY>

  </ADDRESS>

  <EQUIPMENT>

  <EQUI_NO>4442</EQUI_NO>

  <EQUI_NO>8163</EQUI_NO>

  <EQUI_NO>8199</EQUI_NO>

  <EQUI_NO>8200</EQUI_NO>

  <EQUI_NO>8201</EQUI_NO>

  <EQUI_NO>8210</EQUI_NO>

  <EQUI_NO>8211</EQUI_NO>

  <EQUI_NO>58120</EQUI_NO>

  <EQUI_NO>90000-EMERGENCY</EQUI_NO>

  <EQUI_NO>90000-STOCK</EQUI_NO>

  </EQUIPMENT>

  <STORAGE_LOC>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 HEN</DESCRIPTION>

  </STORAGE_LOC>

  <CUST_NO>200793</CUST_NO>

  <ADDRESS>

  <SHIP_TO>200793</SHIP_TO>

  <NAME1>Minera San Cristobal S.A.</NAME1>

  <STREET>Calacoto, Calle 90, Torre 2</STREET>

  <HOUSE_NO>Piso 5</HOUSE_NO>

  <CITY>La Paz</CITY>

  </ADDRESS>

  <EQUIPMENT>

  <EQUI_NO>90000-EMERGENCY</EQUI_NO>

  <EQUI_NO>90000-STOCK</EQUI_NO>

  </EQUIPMENT>

  <STORAGE_LOC>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 HEN</DESCRIPTION>

  </STORAGE_LOC>

  <CUST_NO>200801</CUST_NO>

  <ADDRESS>

  <SHIP_TO>200801</SHIP_TO>

  <NAME1>ISEMAR S.A.</NAME1>

  <STREET>Ruta Km 28.45</STREET>

  <CITY>Don Torcuato Paraguay</CITY>

  </ADDRESS>

  <EQUIPMENT>

  <EQUI_NO>15079</EQUI_NO>

  <EQUI_NO>15097</EQUI_NO>

  <EQUI_NO>90000-EMERGENCY</EQUI_NO>

  <EQUI_NO>90000-STOCK</EQUI_NO>

  </EQUIPMENT>

  <STORAGE_LOC>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 HEN</DESCRIPTION>

  </STORAGE_LOC>

</CUSTOMER_FULL_20140207_033015_001>

Thanks

akhileshkiran
Contributor
0 Kudos

Hi

When i try using the XML & XSD. I got a warning messages when i validate the job but there is no foreign key relationship exits or column with the same exits. But the job is running successfully without any errors. But there is still some problem in schema.

Regards,

Akhileshkiran.

Former Member
0 Kudos

HI Akhileshkiran.

Thanks, but I Dont Know what is the problem with the schema, I Never load from XML File.

this is the problem, the construction of schema, do you know? 🙂

akhileshkiran
Contributor
0 Kudos

Yes Juna,

The problem is you are using multiple same filed name in one nested form and passing them into single field in the structure.

Where your DTD or XSD is holding single column

Regards,

Akhileshkiran.

Former Member
0 Kudos

Hi Akhileshkiran.

Thanks


This is the XML File from SAP ERP, and I cant modify the file XML

Like I said first position and XML structure not know much, all I know is that the structure of XML can not be changed, generates another country, another department


I loaded this way



😕


Thanks

akhileshkiran
Contributor
0 Kudos

Hi Juan,

As you observe both the screens above. The empty spaces are filled with the null.

But the data is loading into target as same as the source.

Regards,
Akhileshkiran.

akhileshkiran
Contributor
0 Kudos

Hi ,

I generated a new XSD file using MS Visual Studio based on your XML file.

The empty spaces in the source is replaced with <Null> in the target table.

Here is the XSD:

<?xml version="1.0" encoding="utf-8"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="CUSTOMER_FULL_20140207_033015_001">

        <xs:complexType>

            <xs:sequence>

                <xs:choice maxOccurs="unbounded">

                    <xs:element name="CUST_NO" type="xs:unsignedInt" />

                    <xs:element name="ADDRESS">

                        <xs:complexType>

                            <xs:sequence>

                                <xs:element name="SHIP_TO" type="xs:unsignedInt" />

                                <xs:element name="NAME1" type="xs:string" />

                                <xs:element name="STREET" type="xs:string" />

                                <xs:element minOccurs="0" name="HOUSE_NO" type="xs:string" />

                                <xs:element name="CITY" type="xs:string" />

                            </xs:sequence>

                        </xs:complexType>

                    </xs:element>

                    <xs:element name="EQUIPMENT">

                        <xs:complexType>

                            <xs:sequence>

                                <xs:element maxOccurs="unbounded" name="EQUI_NO" type="xs:string" />

                            </xs:sequence>

                        </xs:complexType>

                    </xs:element>

                    <xs:element name="STORAGE_LOC">

                        <xs:complexType>

                            <xs:sequence>

                                <xs:choice maxOccurs="unbounded">

                                    <xs:element name="STOR_LOC_NO" type="xs:unsignedByte" />

                                    <xs:element name="DESCRIPTION" type="xs:string" />

                                </xs:choice>

                            </xs:sequence>

                        </xs:complexType>

                    </xs:element>

                </xs:choice>

            </xs:sequence>

        </xs:complexType>

    </xs:element>

</xs:schema>

For Source XML


<?xml version="1.0" encoding="utf-8"?>

<CUSTOMER_FULL_20140207_033015_001>

  <CUST_NO>200530</CUST_NO>

  <ADDRESS>

  <SHIP_TO>903533</SHIP_TO>

  <NAME1>HENLEY - PART MAQUINARIAS S.A.</NAME1>

  <STREET>Dean Camilo # 148, San Carlos</STREET>

  <CITY>LIMA</CITY>

  </ADDRESS>

  <EQUIPMENT>

  <EQUI_NO>4442</EQUI_NO>

  <EQUI_NO>8163</EQUI_NO>

  <EQUI_NO>8199</EQUI_NO>

  <EQUI_NO>8200</EQUI_NO>

  <EQUI_NO>8201</EQUI_NO>

  <EQUI_NO>8210</EQUI_NO>

  <EQUI_NO>8211</EQUI_NO>

  <EQUI_NO>58120</EQUI_NO>

  <EQUI_NO>90000-EMERGENCY</EQUI_NO>

  <EQUI_NO>90000-STOCK</EQUI_NO>

  </EQUIPMENT>

  <STORAGE_LOC>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 HEN</DESCRIPTION>

  </STORAGE_LOC>

  <CUST_NO>200793</CUST_NO>

  <ADDRESS>

  <SHIP_TO>200793</SHIP_TO>

  <NAME1>Minera San Cristobal S.A.</NAME1>

  <STREET>Calacoto, Calle 90, Torre 2</STREET>

  <HOUSE_NO>Piso 5</HOUSE_NO>

  <CITY>La Paz</CITY>

  </ADDRESS>

  <EQUIPMENT>

  <EQUI_NO>90000-EMERGENCY</EQUI_NO>

  <EQUI_NO>90000-STOCK</EQUI_NO>

  </EQUIPMENT>

  <STORAGE_LOC>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 HEN</DESCRIPTION>

  </STORAGE_LOC>

  <CUST_NO>200801</CUST_NO>

  <ADDRESS>

  <SHIP_TO>200801</SHIP_TO>

  <NAME1>ISEMAR S.A.</NAME1>

  <STREET>Ruta Km 28.45</STREET>

  <CITY>Don Torcuato Paraguay</CITY>

  </ADDRESS>

  <EQUIPMENT>

  <EQUI_NO>15079</EQUI_NO>

  <EQUI_NO>15097</EQUI_NO>

  <EQUI_NO>90000-EMERGENCY</EQUI_NO>

  <EQUI_NO>90000-STOCK</EQUI_NO>

  </EQUIPMENT>

  <STORAGE_LOC>

  <STOR_LOC_NO>0001</STOR_LOC_NO>

  <DESCRIPTION>01 Parts Center</DESCRIPTION>

  <STOR_LOC_NO>0056</STOR_LOC_NO>

  <DESCRIPTION>56 HEN</DESCRIPTION>

  </STORAGE_LOC>

</CUSTOMER_FULL_20140207_033015_001>

Output:

Regards,
Akhileshkiran.

Former Member
0 Kudos

Do you can try with this XML file? and this xml schema?

these are the originals

should give the problem of element ITEM

Thanks

XML DOCUMENT

<?xml version="1.0" encoding="utf-8"?><CUSTOMER_FULL_20140207_033015_001><item><CUST_NO>200333</CUST_NO><ADDRESS><item><SHIP_TO>200333</SHIP_TO><NAME1>henley - MAQUINARIAS PERU S.A.</NAME1><STREET>Dean Cuarto # 1483, San Ciro</STREET><CITY>LIMA</CITY></item></ADDRESS><EQUIPMENT><item><EQUI_NO>8162</EQUI_NO></item><item><EQUI_NO>8163</EQUI_NO></item><item><EQUI_NO>8199</EQUI_NO></item><item><EQUI_NO>8200</EQUI_NO></item><item><EQUI_NO>8201</EQUI_NO></item><item><EQUI_NO>8210</EQUI_NO></item><item><EQUI_NO>8211</EQUI_NO></item><item><EQUI_NO>58120</EQUI_NO></item><item><EQUI_NO>90000-EMERG</EQUI_NO></item><item><EQUI_NO>90000-ST</EQUI_NO></item></EQUIPMENT><STORAGE_LOC><item><STOR_LOC_NO>0001</STOR_LOC_NO><DESCRIPTION>01 Parts Center</DESCRIPTION></item><item><STOR_LOC_NO>0056</STOR_LOC_NO><DESCRIPTION>33 henley</DESCRIPTION></item></STORAGE_LOC></item><item><CUST_NO>200793</CUST_NO><ADDRESS><item><SHIP_TO>200793</SHIP_TO><NAME1>Minera San Juan S.A.</NAME1><STREET>Calacoto, Calle 11, Torre Prett</STREET><HOUSE_NO>Piso 5</HOUSE_NO><CITY>La Paz</CITY></item></ADDRESS><EQUIPMENT><item><EQUI_NO>90000-EMERGENCY</EQUI_NO></item><item><EQUI_NO>90000-STOCK</EQUI_NO></item></EQUIPMENT><STORAGE_LOC><item><STOR_LOC_NO>0001</STOR_LOC_NO><DESCRIPTION>01 Parts Center</DESCRIPTION></item><item><STOR_LOC_NO>0056</STOR_LOC_NO><DESCRIPTION>33 henley</DESCRIPTION></item></STORAGE_LOC></item><item><CUST_NO>200801</CUST_NO><ADDRESS><item><SHIP_TO>200801</SHIP_TO><NAME1>ISEMAR S.A.</NAME1><STREET>Ruta Pana Km 28.45</STREET><CITY>Don Torcuato Paraguay</CITY></item></ADDRESS><EQUIPMENT><item><EQUI_NO>15079</EQUI_NO></item><item><EQUI_NO>15097</EQUI_NO></item><item><EQUI_NO>90000-EMER</EQUI_NO></item><item><EQUI_NO>90000-STOCK</EQUI_NO></item></EQUIPMENT><STORAGE_LOC><item><STOR_LOC_NO>0001</STOR_LOC_NO><DESCRIPTION>01 Parts Center</DESCRIPTION></item><item><STOR_LOC_NO>0056</STOR_LOC_NO><DESCRIPTION>33 henley</DESCRIPTION></item></STORAGE_LOC></item></CUSTOMER_FULL_20140207_033015_001>                    

XML SCHEMA

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:element name="CUSTOMER_FULL_20140207_033015_001">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="item">

    <xs:complexType>

      <xs:sequence>

        <xs:element minOccurs="0" ref="STORAGE_LOC"/>

        <xs:sequence minOccurs="0">

          <xs:element ref="STOR_LOC_NO"/>

          <xs:element ref="DESCRIPTION"/>

        </xs:sequence>

        <xs:element minOccurs="0" ref="EQUIPMENT"/>

        <xs:element minOccurs="0" ref="EQUI_NO"/>

        <xs:sequence minOccurs="0">

          <xs:element ref="CUST_NO"/>

          <xs:element ref="ADDRESS"/>

          <xs:element ref="SHIP_TO"/>

          <xs:element ref="NAME1"/>

          <xs:element ref="STREET"/>

        </xs:sequence>

        <xs:element minOccurs="0" ref="HOUSE_NO"/>

        <xs:element minOccurs="0" ref="CITY"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="STORAGE_LOC">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="STOR_LOC_NO" type="xs:integer"/>

  <xs:element name="DESCRIPTION" type="xs:string"/>

  <xs:element name="EQUIPMENT">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="EQUI_NO" type="xs:NMTOKEN"/>

  <xs:element name="CUST_NO" type="xs:integer"/>

  <xs:element name="ADDRESS">

    <xs:complexType>

      <xs:sequence>

        <xs:element ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="SHIP_TO" type="xs:integer"/>

  <xs:element name="NAME1" type="xs:string"/>

  <xs:element name="STREET" type="xs:string"/>

  <xs:element name="HOUSE_NO" type="xs:string"/>

  <xs:element name="CITY" type="xs:string"/>

</xs:schema>

Thanks

Former Member
0 Kudos

Hi

your generated schema in MS Visual Studio is better than I generated it with Stylus Studio, and standing CUST_NO first, as it should be.

I think I should put a flow to record the data correctly in the table, think the same?

akhileshkiran
Contributor
0 Kudos

Hi Juan,

Please close the thread if you feel Answered/Helpful

Thanks & Regards,

Akhileshkiran.

Former Member
0 Kudos

Hi Akhilesh Kiran

Thanks a lot for your help.

but do you can try with this XML file? and this xml schema?

these are the originals

should give the problem of element ITEM

Thanks

XML DOCUMENT

<?xml version="1.0" encoding="utf-8"?><CUSTOMER_FULL_20140207_033015_001><item><CUST_NO>200333</CUST_NO><ADDRESS><item><SHIP_TO>200333</SHIP_TO><NAME1>henley - MAQUINARIAS PERU S.A.</NAME1><STREET>Dean Cuarto # 1483, San Ciro</STREET><CITY>LIMA</CITY></item></ADDRESS><EQUIPMENT><item><EQUI_NO>8162</EQUI_NO></item><item><EQUI_NO>8163</EQUI_NO></item><item><EQUI_NO>8199</EQUI_NO></item><item><EQUI_NO>8200</EQUI_NO></item><item><EQUI_NO>8201</EQUI_NO></item><item><EQUI_NO>8210</EQUI_NO></item><item><EQUI_NO>8211</EQUI_NO></item><item><EQUI_NO>58120</EQUI_NO></item><item><EQUI_NO>90000-EMERG</EQUI_NO></item><item><EQUI_NO>90000-ST</EQUI_NO></item></EQUIPMENT><STORAGE_LOC><item><STOR_LOC_NO>0001</STOR_LOC_NO><DESCRIPTION>01 Parts Center</DESCRIPTION></item><item><STOR_LOC_NO>0056</STOR_LOC_NO><DESCRIPTION>33 henley</DESCRIPTION></item></STORAGE_LOC></item><item><CUST_NO>200793</CUST_NO><ADDRESS><item><SHIP_TO>200793</SHIP_TO><NAME1>Minera San Juan S.A.</NAME1><STREET>Calacoto, Calle 11, Torre Prett</STREET><HOUSE_NO>Piso 5</HOUSE_NO><CITY>La Paz</CITY></item></ADDRESS><EQUIPMENT><item><EQUI_NO>90000-EMERGENCY</EQUI_NO></item><item><EQUI_NO>90000-STOCK</EQUI_NO></item></EQUIPMENT><STORAGE_LOC><item><STOR_LOC_NO>0001</STOR_LOC_NO><DESCRIPTION>01 Parts Center</DESCRIPTION></item><item><STOR_LOC_NO>0056</STOR_LOC_NO><DESCRIPTION>33 henley</DESCRIPTION></item></STORAGE_LOC></item><item><CUST_NO>200801</CUST_NO><ADDRESS><item><SHIP_TO>200801</SHIP_TO><NAME1>ISEMAR S.A.</NAME1><STREET>Ruta Pana Km 28.45</STREET><CITY>Don Torcuato Paraguay</CITY></item></ADDRESS><EQUIPMENT><item><EQUI_NO>15079</EQUI_NO></item><item><EQUI_NO>15097</EQUI_NO></item><item><EQUI_NO>90000-EMER</EQUI_NO></item><item><EQUI_NO>90000-STOCK</EQUI_NO></item></EQUIPMENT><STORAGE_LOC><item><STOR_LOC_NO>0001</STOR_LOC_NO><DESCRIPTION>01 Parts Center</DESCRIPTION></item><item><STOR_LOC_NO>0056</STOR_LOC_NO><DESCRIPTION>33 henley</DESCRIPTION></item></STORAGE_LOC></item></CUSTOMER_FULL_20140207_033015_001>                   

XML SCHEMA

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:element name="CUSTOMER_FULL_20140207_033015_001">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="item">

    <xs:complexType>

      <xs:sequence>

        <xs:element minOccurs="0" ref="STORAGE_LOC"/>

        <xs:sequence minOccurs="0">

          <xs:element ref="STOR_LOC_NO"/>

          <xs:element ref="DESCRIPTION"/>

        </xs:sequence>

        <xs:element minOccurs="0" ref="EQUIPMENT"/>

        <xs:element minOccurs="0" ref="EQUI_NO"/>

        <xs:sequence minOccurs="0">

          <xs:element ref="CUST_NO"/>

          <xs:element ref="ADDRESS"/>

          <xs:element ref="SHIP_TO"/>

          <xs:element ref="NAME1"/>

          <xs:element ref="STREET"/>

        </xs:sequence>

        <xs:element minOccurs="0" ref="HOUSE_NO"/>

        <xs:element minOccurs="0" ref="CITY"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="STORAGE_LOC">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="STOR_LOC_NO" type="xs:integer"/>

  <xs:element name="DESCRIPTION" type="xs:string"/>

  <xs:element name="EQUIPMENT">

    <xs:complexType>

      <xs:sequence>

        <xs:element maxOccurs="unbounded" ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="EQUI_NO" type="xs:NMTOKEN"/>

  <xs:element name="CUST_NO" type="xs:integer"/>

  <xs:element name="ADDRESS">

    <xs:complexType>

      <xs:sequence>

        <xs:element ref="item"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

  <xs:element name="SHIP_TO" type="xs:integer"/>

  <xs:element name="NAME1" type="xs:string"/>

  <xs:element name="STREET" type="xs:string"/>

  <xs:element name="HOUSE_NO" type="xs:string"/>

  <xs:element name="CITY" type="xs:string"/>

</xs:schema>

Thanks

akhileshkiran
Contributor
0 Kudos

Sure not a problem

Regards,

Akhileshkiran.

Former Member
0 Kudos

thank you Akhilesh Kiran

akhileshkiran
Contributor
0 Kudos

Hi Juna,

I was unable to run the job. Its returning the Error .

with the above files.

Regards,

Akhileshkiran.

Former Member
0 Kudos

What is the error?

akhileshkiran
Contributor
0 Kudos

Hi Juan,

Regards,

Akhileshkiran.

Former Member
0 Kudos

Thanks Akhilesh Kiran

Might generate the schema with your MS Visual Studio tool, I do not have it installed and tested, is that I aim not to xml document, but the schema generation


Thanks a lot

akhileshkiran
Contributor
0 Kudos

Hi Juan,

Please close the thread if you feel helpful.

you can refer below link to close the thread.

Regards,

Akhileshkiran.

Former Member
0 Kudos

I do not know if my problem is not due to the generation of the scheme, you could try creating the schema with your tool ms visual studio?

thanks a lot

Former Member
0 Kudos

Hi Akhilesh Kiran


The solution is with the original xml with <items> tag.

The correct answer is with circular level =1 at xml metadata


Thank You