I have an XML that my company sends out daily it used to be created by SQL but I now have to use crystal reports and I can't seem to get it to line up the same. Please help with any references or how to rewrite my schema. I will try to provide pictures of what currently have.
(This is Mine from Crystal Reports)
-
[b]<?xml version="1.0" encoding="UTF-8" ?>
-
- <BSASStockStatus xmlns="urn:crystal-reports:schemas" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="urn:crystal-reports:schemas Stock_Status_Columns788.xsd">
-
- <ReportArea Level="0" Type="Report" ReportDate="">
-
- <Items Type="Header">
-
<Text>7/18/2007</Text>
-
</Items>
-
- <Item Level="1" Type="Details">
-
<strPartNumber FieldName="{STOCK.PARTNUMBER}">004-351-0</strPartNumber>
-
<strNomenclature FieldName="{STOCK.DESCRIPTN}">TIRE</strNomenclature>
-
<strQuantity FieldName="{STOCK.QTY_INSTOCK}">1.00</strQuantity>
-
<strSafetyLevel FieldName="{STOCK.MINQTYLEVEL}">0.00</strSafetyLevel>
-
<strASL FieldName="{STOCK.MAXQTYLEVEL}">1.00</strASL>
-
(This is how I need it to be)
-
<?xml version="1.0" ?>
-
- <BSASStock:StockStatus xmlns:BSASStock="http://www.w3.org/2001/XMLSchema-instance" reportDate="2007-06-01" BSASStock:schemaLocation="BSAS-Stock.xsd">
-
- <Items>
-
- <item strPartNumber="01-P24481F001">
-
<strNomenclature>"POWER CONTROL PTRA200"</strNomenclature>
-
<strQuantity>"4"</strQuantity>
-
<strSafetyLevel>"3"</strSafetyLevel>
-
<strASL>"6"</strASL>
-
</item>
-
- <item strPartNumber="01-P25390B002">
-
<strNomenclature>"SATCOM REMOTE CONTROL"</strNomenclature>
-
<strQuantity>"3"</strQuantity>
-
<strSafetyLevel>"7"</strSafetyLevel>
-
<strASL>"13"</strASL>
-
</item>
-
MY SCHEMA
Original Schema
- <?xml version="1.0" encoding="UTF-8" ?>
-
- <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:BSASStock="http://www.BSAS.com" targetNamespace="http://www.BSAS.com" elementFormDefault="unqualified" attributeFormDefault="unqualified">
-
- <annotation>
-
<documentation>Created as a test specification for sending of BSAS Stock Data to Army Copyright 2007 (c) BSAS - All rights reserved.</documentation>
-
</annotation>
-
<element name="StockStatus" type="BSASStock:StockStatusType" />
-
- <complexType name="StockStatusType">
-
- <sequence>
-
<element name="Items" type="BSASStock:ItemsType" />
-
</sequence>
-
<attribute name="reportDate" type="date" />
-
</complexType>
-
- <complexType name="ItemsType">
-
- <sequence>
-
- <element name="item" minOccurs="0" maxOccurs="unbounded">
-
- <complexType>
-
- <sequence>
-
<element name="strNomenclature" type="string" />
-
<element name="strQuantity" type="string" />
-
<element name="strSafetyLevel" type="string" />
-
<element name="strASL" type="string" />
-
<element name="strVendor" type="string" />
-
</sequence>
-
<attribute name="strPartNumber" type="string" />
-
</complexType>
-
</element>
-
</sequence>
-
</complexType>
-
</schema>
-
I apologize for the length this is my first time use.