View Single Post
Old 02-08-2013, 04:55 PM   PM User | #3
Rcoleman25
New Coder

 
Join Date: Jun 2012
Posts: 18
Thanks: 8
Thanked 0 Times in 0 Posts
Rcoleman25 is an unknown quantity at this point
Quote:
Originally Posted by sunfighter View Post
What you have is not an xml file, it is an XML Schema, a file that describes the structure of an XML document. It is used to write the xml.
From w3schools:
A xml file:
Code:
<?xml version="1.0"?>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
The following example is an XML Schema file called "note.xsd" that defines the elements of the XML document above ("note.xml"):
Code:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified">

<xs:element name="note">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="to" type="xs:string"/>
      <xs:element name="from" type="xs:string"/>
      <xs:element name="heading" type="xs:string"/>
      <xs:element name="body" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

</xs:schema>
If your getting from another site either ask them for the xml not the xsd or ask them to generate one for you.
Yes... the XML schema basically shows how the XML should be layed out in my file. My question is how do I lay out/embed the XML in my HTML file.
Rcoleman25 is offline   Reply With Quote