Ultimate Sidebar

How to Convert a Database to an XML Schema

104 27
    • 1). Open XMLSpy 2010. From the top menu, select "Convert" and "XML Schema from DB Structure"

    • 2). When the "Connection Wizard" dialog appears, select the "Microsoft Access (ODBC)" option, then click on Next.

    • 3). When the "Connect to MS Access" dialog appears, click on Browse, and use the "Open" dialog to navigate to the XMLSpy 2010 Tutorial folder. This is normally in "C:\ProgramData\Altova\XMLSpy2010\Examples\Tutorial". Then double-click on "Data-shape.mdb". Click on Connect.

    • 4). Make sure that the Table radio button is selected when the "Create XML Schema from DB Structure" dialog shows. Then click on the top item "Data_shape1" to select the entire database. Then click on the System Tables item to de-select the System Tables, so that only the schema or "definitions" of the User Tables "Address," "Company," "Division" and "Person" are converted to XML Schema.

    • 5). Click on Import. Wait a few moments for the import to finish. The new XML Schema document will appear in the active document in the main window panel in the middle of the XMLSpy IDE (Integrated Development Environment). It will appear in the Schema Overview (tabular) format listing the four tables as four rows. Click on the "Content Model View" icon to the left of the Address row. This will display a diagrammatic representation of the Address table and its fields.

    • 6). Click on the "Text" tab in the Main Window to view the XML Schema that has been converted from the database. Then select "File" and "Save As..." to save the XML Schema as "Data_shape1.xsd."

Source: ...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.