Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting xsi in Excel XML output...
Hi,
I've created a spreadsheet inclusive of XML mapping and macro for selecting and checking the required records. However, the XML output has missing information on the required xsi url and the namespace. I do have both the XML and the XSD schema files (from the customer). However, (1) using just the XML file for mapping (using excel created schema) and (2) using XML with the original schema will give me 2 different list of XML source. Running through the XSD file in notepad, it was realised that there were more elements than what was in the XML file. The original XML file (shortened on the element portion) is as below: <?xml version="1.0" encoding="UTF-8" ? <PROCESS_CHEMICALShipment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="QV-MT00641_1_Stella.xsd" PartID="2ERCH-0424D" Supplier="Stella Chemifa" MaterialDesc="BHFLL20:1" SupplierMfgSite="STELLA SINGAPORE" LotID="3783102" LotSize="880" MfgDate="2007-08-31" ExpireDate="2008-08-30" <Lot <Aluminum VALUE="0.05"<RAW VALUE="0.05" / </Aluminum <Antimony VALUE="0.01" </Antimony <Arsenic VALUE="0.05" </Arsenic </Lot </PROCESS_CHEMICALShipment Mapping all elements from method (1) would provide me with the following output (shortened on the element portion): <?xml version="1.0" encoding="UTF-8" standalone="yes"? <PROCESS_CHEMICALShipment PartID="2ERCH-0424D" Supplier="Stella Chemifa" MaterialDesc="BHFLL20:1" SupplierMfgSite="STELLA SINGAPORE" LotID="3783102" LotSize="880" MfgDate="2007-08-31" ExpireDate="2008-08-30" <Lot <Aluminum VALUE="0.05"<RAW VALUE="0.05"/ </Aluminum <Antimony VALUE="0.01"/ <Arsenic VALUE="0.05"/ </Lot </PROCESS_CHEMICALShipment From the above, it can be noticed that the xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="QV-MT00641_1_Stella.xsd" is missing. I did try to use method (2) for the creation of mapping, however, the limitation of excel or error is prompted "Cannot save or export XML data. The XML maps in this workbook are not exportable." After verifying the map for export, it was highlighted the map is not exportable as it contains "List of lists". I did read up on the other thread "Subject: Smart Documents - XSD and Namespace", but pardon me that i do not understand it. Not really understand how to edit the XSD file, since it contains so many other elements that are not in used for the output XML. Is there way to insert the xsi url and namespace into the schema (using method (1))? I do see the "Root" and "Namespace property columns under the "XML Maps", but these are non-editable. Hope to receive a help soon. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to keep the print output colour setting for the same file? | Excel Discussion (Misc queries) | |||
ADD (A3+A1) IN MS EXCEL & I WANT OUTPUT IN CELL A3 HOW ? | Excel Discussion (Misc queries) | |||
Set of varibles produces one output. Need series of output. | Excel Programming | |||
Getting output from an excel output back to cscript.. | Excel Programming | |||
excel output to outlook? | Excel Programming |