XML and XSD Schema structure validation



Can you please inform me if the below structure is correct?


This is the hello.xml



<?xml version="1.0" encoding="utf-8"?>
<something xmlns="http://www.example.com"
xmlns:xsi="http://ift.tt/ra1lAU"
xsi:schemaLocation="http://www.example.com hello.xsd">

<Hello>
<FirstName>John</FirstName>
</Hello>


And this is the hello.xsd



<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://www.example.com"
elementFormDefault="qualified"
xmlns="http://www.example.com hello.xsd"
xmlns:xs="http://ift.tt/tphNwY">

<xs:element name="something">
<xs:complexType>
<xs:sequence>
<xs:element name="Hello">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="FirstName"/>
</xs:sequence>
</xs:complexType>

No comments:

Post a Comment