Results 1 to 3 of 3

Thread: How to create XML Schema

  1. #1
    Join Date
    Apr 2009
    Posts
    55

    How to create XML Schema

    Hello,

    Can anyone suggest me how to generate the XML scheme,I heard that we are able to generate XML schema for different types of DTDs(Document type Definition) and if this is true please let me know.
    Please share if you have any good ideas.
    Thanks.

  2. #2
    Join Date
    Apr 2008
    Posts
    193

    Re: How to create XML Schema

    When XML first came out, there were DTDs (Document Type Definitions) that defined what the XML was going to look like and how it worked. But DTDs were written in yet another format than XML and so if you wanted to write XML applications you had to learn XML and how to write a DTD.

    You can use XML to define just about any kind of text data that you might want to.

    The purpose of a schema is to define your XML document. So, the easiest way to create a schema is to start with a basic XML document that you want to define.

    for example if you select an Newsletter that document consists of a main element:

    webwriter_newsletter

    and five sub elements:

    • header
    • section1
    • section2
    • section3
    • section4


    Each of the sub elements contains more elements, An element that contains a sub element is called a complex type, while elements that only contain text, numbers, or dates are called simple types.

  3. #3
    Join Date
    Dec 2008
    Posts
    202

    Re: How to create XML Schema

    An XML Schema describes the structure of an XML document.

    following is the little example of XML schema:

    Code:
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    
    <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>

Similar Threads

  1. Schema Admins
    By AngerEyes in forum Active Directory
    Replies: 1
    Last Post: 22-05-2011, 03:57 AM
  2. Schema in SQL2
    By \"Dritan\" in forum Software Development
    Replies: 3
    Last Post: 11-01-2011, 08:26 AM
  3. Moving tables to another schema
    By garfield1 in forum Software Development
    Replies: 4
    Last Post: 20-02-2010, 08:53 PM
  4. Don't know about XML schema
    By ScarFace 01 in forum Software Development
    Replies: 5
    Last Post: 04-02-2010, 09:20 AM
  5. Get ddl of schema from toad
    By Katlin in forum Software Development
    Replies: 2
    Last Post: 29-05-2009, 06:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,860,163.99941 seconds with 17 queries