locked
XML schema? RRS feed

  • Question

  • what is XML schema and how it varies from DTD?
    Thursday, March 8, 2007 9:22 AM

Answers

  • XML Schema is used as a substitute for DTD. Its is more effective and contains seperate namespaces and other stuffs..

    I ll try to come up with more info soon !

    Thursday, March 8, 2007 9:43 AM
  • XML schema looks as follows !

    <?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>
    Friday, March 9, 2007 6:28 AM

All replies

  • XML Schema is used as a substitute for DTD. Its is more effective and contains seperate namespaces and other stuffs..

    I ll try to come up with more info soon !

    Thursday, March 8, 2007 9:43 AM
  • XML schema looks as follows !

    <?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>
    Friday, March 9, 2007 6:28 AM