Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 27-04-2009
Member
 
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.
Reply With Quote
  #2  
Old 27-04-2009
Member
 
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.
Reply With Quote
  #3  
Old 27-04-2009
Member
 
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>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 05:06 AM.