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!

XML/XSD and MySQL

Status
Not open for further replies.

synapsevampire

Programmer
Mar 23, 2002
20,180
US
I'm trying to learn how I might create the data structures as defined here in this XSD (or is it XML) file into a MySQL 5.015 database:

First part of the file:

.<!--

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
 
Thanks, but it isn't the same, I'm looking to create tables, not import the data.

Also you might check out Altova Software’s Suite, in particular the XMLSPY:


There’s also Navicat for importing XML data, not sure what else it might do such as creating structures, anyway, it’s here:


But I need help specifically with the file as I posted it.

-k
 
Sorry, I misread your question. This looks like XML Schema, which I'm not too familiar with, but the tables might look something like this:
[tt]
CREATE TABLE sobject # for each "sObject"
(
sobject_id INT PRIMARY KEY,
fieldstonull CHAR(100)
)

CREATE TABLE sobject_ids # for each "id" within "sObject"
(
sobject_id INT NOT NULL,
id INT
)

CREATE TABLE account # for each "Account"
(
sobject_id INT PRIMARY KEY,
account_short_name_c CHAR(20),
annualrevenue MEDIUMINT
)
[/tt]
That's about all I can do given the level of detail provided, but if you can provide more information, we might be able to help further.
 
I'm hoping for a tool or something that will read this file structure and create tables from it, it looks like some sort of XSD to me.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top