XML Online Editor

One online XML editor I found is called XmlGrid.net. It will, among other things, convert your XML file to an XSD file for you.

An XML Schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD). The purpose of an XML Schema is to define the legal building blocks of an XML document:

  • the elements and attributes that can appear in a document
  • the number of (and order of) child elements
  • data types for elements and attributes
  • default and fixed values for elements and attributes

In the XML world, hundreds of standardized XML formats are in daily use. Many of these XML standards are defined by XML Schemas. XML Schema is an XML-based (and more powerful) alternative to DTD. A DTD is a Document Type Definition. A DTD defines the structure and the legal elements and attributes of an XML document. With a DTD, independent groups of people can agree on a standard DTD for interchanging data. An application can use a DTD to verify that XML data is valid.

<?xml version='1.0'?>
      <Title>My World</Title>
      <Author>Nancy Davolio</Author>
      <Title>Get Connected</Title>
      <Author>Janet Leverling</Author>
      <Author>Robert Fuller</Author>

<?xml version="1.0" encoding="UTF-8"?>
   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <!-- XML Schema Generated from XML Document on Wed Feb 22 2017 08:53:34 GMT-0500 (Eastern Standard Time) -->
         <!-- with XmlGrid.net Free Online Service http://xmlgrid.net -->
         <xs:element name="BookInfo">
                           <xs:element name="Book" maxOccurs="unbounded">
                                             <xs:element name="ISBN" type="xs:string"></xs:element>
                                             <xs:element name="Title" type="xs:string"></xs:element>
                                             <xs:element name="Author" type="xs:string"></xs:element>
                                             <xs:element name="Quantity" type="xs:int"></xs:element>

Microsoft XML to XSD Tool

Microsoft has a tool for this.

Series Navigation<< XML IntroductionXML Attributes vs. Elements >>

Leave a comment

Your email address will not be published. Required fields are marked *