Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the purpose of XSD files?
    text
    copied!<p>though we can query on the xml file from c# (.net). why need of .xsd file ? I know it is metadata file of particular xml file. we can specify the relationships in xsd. but what its functioning then ? </p> <p>Sure: See, I have the xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;Root&gt; Customers-&gt; -&gt;Customer -&gt;CustomerID="GREAL"&gt;-&gt; &lt;CompanyName&gt;Great Lakes Food Market&lt;/CompanyName&gt; &lt;ContactName&gt;Howard Snyder&lt;/ContactName&gt; &lt;ContactTitle&gt;Marketing Manager&lt;/ContactTitle&gt; &lt;Phone&gt;(503) 555-7555&lt;/Phone&gt; &lt;FullAddress&gt; &lt;Address&gt;2732 Baker Blvd.&lt;/Address&gt; &lt;City&gt;Eugene&lt;/City&gt; &lt;Region&gt;OR&lt;/Region&gt; &lt;PostalCode&gt;97403&lt;/PostalCode&gt; &lt;Country&gt;USA&lt;/Country&gt; &lt;/FullAddress&gt; &lt;-&lt;/Customer&gt; &lt;- &lt;/Customers&gt; &lt;Orders&gt; &lt;Order&gt; &lt;CustomerID&gt;GREAL&lt;/CustomerID&gt; &lt;EmployeeID&gt;6&lt;/EmployeeID&gt; &lt;OrderDate&gt;1997-05-06T00:00:00&lt;/OrderDate&gt; &lt;RequiredDate&gt;1997-05-20T00:00:00&lt;/RequiredDate&gt; &lt;ShipInfo ShippedDate="1997-05-09T00:00:00"&gt; &lt;ShipVia&gt;2&lt;/ShipVia&gt; &lt;Freight&gt;3.35&lt;/Freight&gt; &lt;ShipName&gt;Great Lakes Food Market&lt;/ShipName&gt; &lt;ShipAddress&gt;2732 Baker Blvd.&lt;/ShipAddress&gt; &lt;ShipCity&gt;Eugene&lt;/ShipCity&gt; &lt;ShipRegion&gt;OR&lt;/ShipRegion&gt; &lt;ShipPostalCode&gt;97403&lt;/ShipPostalCode&gt; &lt;ShipCountry&gt;USA&lt;/ShipCountry&gt; &lt;/ShipInfo&gt; &lt;/Order&gt; &lt;Order&gt; &lt;CustomerID&gt;GREAL&lt;/CustomerID&gt; &lt;EmployeeID&gt;8&lt;/EmployeeID&gt; &lt;OrderDate&gt;1997-07-04T00:00:00&lt;/OrderDate&gt; &lt;RequiredDate&gt;1997-08-01T00:00:00&lt;/RequiredDate&gt; &lt;ShipInfo ShippedDate="1997-07-14T00:00:00"&gt; &lt;ShipVia&gt;2&lt;/ShipVia&gt; &lt;Freight&gt;4.42&lt;/Freight&gt; &lt;ShipName&gt;Great Lakes Food Market&lt;/ShipName&gt; &lt;ShipAddress&gt;2732 Baker Blvd.&lt;/ShipAddress&gt; &lt;ShipCity&gt;Eugene&lt;/ShipCity&gt; &lt;ShipRegion&gt;OR&lt;/ShipRegion&gt; &lt;ShipPostalCode&gt;97403&lt;/ShipPostalCode&gt; &lt;ShipCountry&gt;USA&lt;/ShipCountry&gt; &lt;/ShipInfo&gt; &lt;/Order&gt; &lt;/Orders&gt; &lt;/Root&gt; </code></pre> <p>I want to get data from the ORDERS elements according to provided CustomeId.</p> <p><strong>Also questions is</strong>: What is the purpose of giving the relationships in xsd.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload