Dears,
kindly help in writing VBA code to produce XSD for the below requirement. I have two columns one is having data element name and another column is defined hierarchy. Both columns are availble as excel data.
[TABLE="width: 580"]
<tbody>[TR]
[TD]Schema DE Name[/TD]
[TD]Hierarchy[/TD]
[/TR]
[TR]
[TD]NSM-VEHICLEPASSINFORMATION[/TD]
[TD]NSM-VEHICLEPASSINFORMATION[/TD]
[/TR]
[TR]
[TD]gatePassNumber[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]gatePassGenerationDateTime[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]gatePassStatus[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]tripType[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]totalTrips[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]entryCustomsStationCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]exitCustomsStationCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]transporterName[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]transporterCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]vehiclePlateNumber[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]driverName[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]driverIC[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]GATEPASSDETAILS[/TD]
[TD]CHILD(NSM-VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]GATEPASSDETAIL[/TD]
[TD]CHILD(GATEPASSDETAILS)[/TD]
[/TR]
[TR]
[TD]tripNumber[/TD]
[TD]ELEMENT(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]tripStatus[/TD]
[TD]ELEMENT(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]ENTRY[/TD]
[TD]CHILD(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(ENTRY)[/TD]
[/TR]
[TR]
[TD]expectedEntryDateTime[/TD]
[TD]ELEMENT(ENTRY)[/TD]
[/TR]
[TR]
[TD]DECLARATIONS[/TD]
[TD]CHILD(ENTRY)[/TD]
[/TR]
[TR]
[TD]DECLARATION[/TD]
[TD]CHILD(DECLARATIONS)[/TD]
[/TR]
[TR]
[TD]declarationNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]BLAWBNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEMS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEM[/TD]
[TD]CHILD(ITEMS)[/TD]
[/TR]
[TR]
[TD]HSCode[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantity[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantityUOM[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]CONTAINERS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]CONTAINER[/TD]
[TD]CHILD(CONTAINERS)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(CONTAINER)[/TD]
[/TR]
[TR]
[TD]EXIT[/TD]
[TD]CHILD(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(EXIT)[/TD]
[/TR]
[TR]
[TD]expectedExitDateTime[/TD]
[TD]ELEMENT(EXIT)[/TD]
[/TR]
[TR]
[TD]DECLARATIONS[/TD]
[TD]CHILD(EXIT)[/TD]
[/TR]
[TR]
[TD]DECLARATION[/TD]
[TD]CHILD(DECLARATIONS)[/TD]
[/TR]
[TR]
[TD]declarationNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]BLAWBNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEMS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEM[/TD]
[TD]CHILD(ITEMS)[/TD]
[/TR]
[TR]
[TD]HSCode[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantity[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantityUOM[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]CONTAINERS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]CONTAINER[/TD]
[TD]CHILD(CONTAINERS)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(CONTAINER)[/TD]
[/TR]
</tbody>[/TABLE]
kindly help in writing VBA code to produce XSD for the below requirement. I have two columns one is having data element name and another column is defined hierarchy. Both columns are availble as excel data.
[TABLE="width: 580"]
<tbody>[TR]
[TD]Schema DE Name[/TD]
[TD]Hierarchy[/TD]
[/TR]
[TR]
[TD]NSM-VEHICLEPASSINFORMATION[/TD]
[TD]NSM-VEHICLEPASSINFORMATION[/TD]
[/TR]
[TR]
[TD]gatePassNumber[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]gatePassGenerationDateTime[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]gatePassStatus[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]tripType[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]totalTrips[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]entryCustomsStationCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]exitCustomsStationCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]transporterName[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]transporterCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]vehiclePlateNumber[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]driverName[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]driverIC[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]GATEPASSDETAILS[/TD]
[TD]CHILD(NSM-VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]GATEPASSDETAIL[/TD]
[TD]CHILD(GATEPASSDETAILS)[/TD]
[/TR]
[TR]
[TD]tripNumber[/TD]
[TD]ELEMENT(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]tripStatus[/TD]
[TD]ELEMENT(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]ENTRY[/TD]
[TD]CHILD(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(ENTRY)[/TD]
[/TR]
[TR]
[TD]expectedEntryDateTime[/TD]
[TD]ELEMENT(ENTRY)[/TD]
[/TR]
[TR]
[TD]DECLARATIONS[/TD]
[TD]CHILD(ENTRY)[/TD]
[/TR]
[TR]
[TD]DECLARATION[/TD]
[TD]CHILD(DECLARATIONS)[/TD]
[/TR]
[TR]
[TD]declarationNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]BLAWBNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEMS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEM[/TD]
[TD]CHILD(ITEMS)[/TD]
[/TR]
[TR]
[TD]HSCode[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantity[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantityUOM[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]CONTAINERS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]CONTAINER[/TD]
[TD]CHILD(CONTAINERS)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(CONTAINER)[/TD]
[/TR]
[TR]
[TD]EXIT[/TD]
[TD]CHILD(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(EXIT)[/TD]
[/TR]
[TR]
[TD]expectedExitDateTime[/TD]
[TD]ELEMENT(EXIT)[/TD]
[/TR]
[TR]
[TD]DECLARATIONS[/TD]
[TD]CHILD(EXIT)[/TD]
[/TR]
[TR]
[TD]DECLARATION[/TD]
[TD]CHILD(DECLARATIONS)[/TD]
[/TR]
[TR]
[TD]declarationNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]BLAWBNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEMS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEM[/TD]
[TD]CHILD(ITEMS)[/TD]
[/TR]
[TR]
[TD]HSCode[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantity[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantityUOM[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]CONTAINERS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]CONTAINER[/TD]
[TD]CHILD(CONTAINERS)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(CONTAINER)[/TD]
[/TR]
</tbody>[/TABLE]