2012-05-30 18:27:37 In this example, we show you how to generate a schema from an XML document.
- click the link XML to XSD on the top of this page;
- load your XML document;
- click the button Generate XSD;
Sample XML data, a sitemap.xml created by xml-sitemap.com:
__code__
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" >
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>http://xmlgrid.net/</loc>
<lastmod>2012-05-19T01:28:45+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://xmlgrid.net/demo.html</loc>
<lastmod>2012-03-17T15:19:46+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
__code__
the generated schema:
__code__
<?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 May 30 2012 18:06:13 GMT-0400 (Eastern Daylight Time) -->
<!-- with XmlGrid.net Free Online Service http://xmlgrid.net -->
<xs:element name="urlset" >
<xs:complexType>
<xs:sequence>
<xs:element name="url" maxOccurs="unbounded" >
<xs:complexType>
<xs:sequence>
<xs:element name="loc" type="xs:string" />
<xs:element name="lastmod" type="xs:dateTime" />
<xs:element name="changefreq" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="xmlns" type="xs:string" />
<xs:attribute name="xmlns:xsi" type="xs:string" />
<xs:attribute name="xsi:schemaLocation" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>
__code__
;3425;2012-05-30 18:27:37__s__In this example, we show you how to generate a schema from an XML document. - click the link XML to XSD on the top of this page;
- load your XML document;
- click the button Generate XSD;
Sample XML data, a sitemap.xml created by xml-sitemap.com:
__code__
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" >
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>http://xmlgrid.net/</loc>
<lastmod>2012-05-19T01:28:45+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://xmlgrid.net/demo.html</loc>
<lastmod>2012-03-17T15:19:46+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
__code__
the generated schema:
__code__
<?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 May 30 2012 18:06:13 GMT-0400 (Eastern Daylight Time) -->
<!-- with XmlGrid.net Free Online Service http://xmlgrid.net -->
<xs:element name="urlset" >
<xs:complexType>
<xs:sequence>
<xs:element name="url" maxOccurs="unbounded" >
<xs:complexType>
<xs:sequence>
<xs:element name="loc" type="xs:string" />
<xs:element name="lastmod" type="xs:dateTime" />
<xs:element name="changefreq" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="xmlns" type="xs:string" />
<xs:attribute name="xmlns:xsi" type="xs:string" />
<xs:attribute name="xsi:schemaLocation" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>
__code__
__s__~u=Zac~site=NULL__s__Example generate XSD from XML__s____m__
17,CSS;15,javascript;16,javascript CSS;8,XML C/C++;10,XML converter;12,XML data warehouse;13,XML database;4,XML editor;1,XML general;11,XML HTML;7,XML java;6,XML javascript;5,XML parser;9,XML PHP;2,XML schema;3,XML syntax;14,XPath;