Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a table from XSD?

Status
Not open for further replies.

synapsevampire

Programmer
Mar 23, 2002
20,180
US
Anyone know of a means to create tables from an XSD file?

The beginning of my file looks like this:

.<!--

Salesforce.com Enterprise Web Services API Version 7.0
Generated on 2006-03-15 17:47:40 +0000.

Copyright 1999-2006 salesforce.com, inc.
All Rights Reserved
-->
.<definitions targetNamespace="urn:enterprise.soap.sforce.com">
.<types>
.<schema elementFormDefault="qualified" targetNamespace="urn:sobject.enterprise
<import namespace="urn:enterprise.soap.sforce.com"/>
<!-- Base sObject (abstract) -->
.<complexType name="sObject">
.<sequence>
<element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="
<element name="Id" type="tns:ID" nillable="true" minOccurs="0" maxOccurs="
</sequence>
</complexType>
.<complexType name="Account">
.<complexContent>
.<extension base="ens:sObject">
.<sequence>
<element name="Account_Short_Name__c" nillable="true" minOccurs="0" type
<element name="AnnualRevenue" nillable="true" minOccurs="0" type="xsd:do
<element name="ApplicationServer__c" nillable="true" minOccurs="0" type=
<element name="BillingCity" nillable="true" minOccurs="0" type="xsd:stri
<element name="BillingCountry" nillable="true" minOccurs="0" type="xsd:s
<element name="BillingPostalCode" nillable="true" minOccurs="0" type="xs
<element name="BillingState" nillable="true" minOccurs="0" type="xsd:str
<element name="BillingStreet" nillable="true" minOccurs="0" type="xsd:st
<element name="Budget__c" nillable="true" minOccurs="0" type="xsd:string
<element name="Business_Applications__c" nillable="true" minOccurs="0" t
<element name="Clarify_Region__c" nillable="true" minOccurs="0" type="xs
<element name="Clarify_Standardised_Industry__c" nillable="true" minOccu
type="xsd:string"/>
<element name="CompellingEvent__c" nillable="true" minOccurs="0" type="x
<element name="CompetitveSituation__c" nillable="true" minOccurs="0" typ
<element name="Core_Infrastructure__c" nillable="true" minOccurs="0" typ
<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/
<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:date
<element name="Cust_Status__c" nillable="true" minOccurs="0" type="xsd:s
<element name="Data_Center_Locations__c" nillable="true" minOccurs="0" t
<element name="DealSize__c" nillable="true" minOccurs="0" type="xsd:stri
<element name="Description" nillable="true" minOccurs="0" type="xsd:stri
<element name="Education_Disc_Exp_Date__c" nillable="true" minOccurs="0"
<element name="Education_Disc_Fixed_Rate__c" nillable="true" minOccurs="
<element name="Education_Rate_Disc_Pct__c" nillable="true" minOccurs="0"
<element name="Environment__c" nillable="true" minOccurs="0" type="xsd:s
<element name="Environmental_Complexity__c" nillable="true" minOccurs="0
<element name="Fiscal_Year__c" nillable="true" minOccurs="0" type="xsd:s
<element name="Industry" nillable="true" minOccurs="0" type="xsd:string"
<element name="Intended_Development_Date__c" nillable="true" minOccurs="
<element name="LastModifiedById" nillable="true" minOccurs="0" type="tns
<element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd
<element name="Lead_Status__c" nillable="true" minOccurs="0" type="xsd:s
<element name="License_Disc_Pct__c" nillable="true" minOccurs="0" type="
<element name="License_Discount_Exp_Date__c" nillable="true" minOccurs="
 
What do you mean create a table? XSD defines the structure of XML.

Jon

"I don't regret this, but I both rue and lament it.
 
I think synapsevampire may be in the same boat that I am in. I have and existing XSD Schema, and what I would like to do is create a dataTable to hold data with the constraints defined by the XSD file. I will need to validate data against this Schema, however the XML data has not been created yet, hence the need for the table. Is it possible to define an empty dataTable programatically and incorporate the constraints set forth in the existing XSD Schema, and if so, to then create a "valid" XML document from the data residing in the newly created table (after filling the table with the data that is needed of course)? Maybe something like :

Dim ds as new Dataset()
ds.Tables(0)= newly created dataTable
Dim xDoc as new XMLDocument
xDoc = ds.writeXML()

Is something like this even possible, or am I way off base here? Thanks in Advance.
 
If familiar with the apache project's ramifications, probably Torque, a spin-off of jakata-turbine, would do the job.
Commercial products, shareware like jdbc2xml... But, I don't know enough to be more assertive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top