Microsoft Office Tutorials and References
In Depth Information
2 Click the Save As Type down arrow and click All Files.
3
Type the name of the file in the File Name box. For example, if the name of the file you
want to save as an XML schema file is MySuppliers, you would type MySuppliers.xsd .
For more information on XML data types, visit the World Wide Web Consortium’s reference page at
http://www.w3.org/ and type xml data types into the search box.
Creating XML Data Files
A schema is only one half of what you need to work with XML data; the other half of the
equation is the data itself. After you have created a schema that reflects the structure of your
data, you can write your data into a file with tags corresponding to the outline in your
schema file. The following listing, which you can type into a Notepad file, contains the data
for the first two suppliers in the MySuppliers.xml file included on the CD-ROM:
<?xml version="1.0” encoding="UTF-8” ?>
<Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”
<;$RD> xsi:noNamespaceSchemaLocation="MySuppliers.xsd">
<Supplier>
<SupplierID>1</SupplierID>
<CompanyName>Exotic Liquids</CompanyName>
<ContactName>Charlotte Cooper</ContactName>
<ContactTitle>Purchasing Manager</ContactTitle>
<MailingAddress>
<Address>49 Gilbert St.</Address>�
<City>London</City>�
<Region></Region>�
<PostalCode>EC1 4SD</PostalCode>�
<Country>UK</Country>�
</MailingAddress>�
<Phone>(171) 555-2222</Phone>�
<Fax></Fax>�
</Supplier>
<Supplier>
<SupplierID>2</SupplierID>
<CompanyName>New Orleans Cajun Delights</CompanyName>
<ContactName>Shelley Burke</ContactName>
<ContactTitle>Order Administrator</ContactTitle>
<MailingAddress>
<Address>P.O. Box 78934</Address>
<City>New Orleans</City>
<Region>LA</Region>
<PostalCode>70117</PostalCode>
<Country>USA</Country>
</MailingAddress>
<Phone>(100) 555-4822</Phone>
<Fax></Fax>
</Supplier>
</Root>
Search JabSto ::




Custom Search