EDN Admin
Well-known member
Helloo friends,
I am having some problem in xml please help me out
This is my XSD file -->
<?xml version="1.0" encoding="utf-8"?><br/>
<xs:schema id="XMLSchema"<br/>
targetNamespace="http://tempuri.org/XMLSchema.xsd"<br/>
elementFormDefault="qualified"<br/>
xmlns="http://tempuri.org/XMLSchema.xsd"<br/>
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"<br/>
xmlns:xs="http://www.w3.org/2001/XMLSchema"<br/>
><br/>
<xs:element name="bookstore" type="bookstoreType" /><br/>
<xs:complexType name="bookstoreType <br/>
<xs:sequence maxOccurs="unbounded <br/>
<xs:element name="book" type="bookType </xs:element><br/>
</xs:sequence><br/>
</xs:complexType><br/>
<xs:complexType name="bookType <br/>
<xs:sequence><br/>
<xs:element name="title" type="xs:string" /><br/>
<xs:element name="author" type="authorName" /><br/>
<xs:element name="price" type="xs:decimal" /><br/>
</xs:sequence><br/>
<xs:attribute name="genre" type="xs:string" /><br/>
<xs:attribute name="publicationdate" type="xs:string" /><br/>
<xs:attribute name="ISBN" type="xs:string" /><br/>
</xs:complexType><br/>
<xs:complexType name="authorName <br/>
<xs:sequence><br/>
<xs:element name="first-name" type="xs:string" /><br/>
<xs:element name="last-name" type="xs:string" /><br/>
</xs:sequence><br/>
</xs:complexType><br/>
</xs:schema>
Now i am using this xsd file in XML file--->
<?xml version="1.0" encoding="utf-8" ?><br/>
<bookstore xmlns="http://www.books.org"<br/>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br/>
xsi:schemaLocation="file:///C:/Users/Varun/Documents/Visual%20Studio%202010/WebSites/XML/XMLSchema.xsd <br/>
<book abc="df" genre="anuj" publication ="1981" ISBN="1-861 <br/>
<dfff><br/>
<br/>
</dfff><br/>
</book><br/>
</bookstore>
Now according to the schema file ,this XMl should give me intelligence help and errors but its not showing.Why so?
View the full article
I am having some problem in xml please help me out
This is my XSD file -->
<?xml version="1.0" encoding="utf-8"?><br/>
<xs:schema id="XMLSchema"<br/>
targetNamespace="http://tempuri.org/XMLSchema.xsd"<br/>
elementFormDefault="qualified"<br/>
xmlns="http://tempuri.org/XMLSchema.xsd"<br/>
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"<br/>
xmlns:xs="http://www.w3.org/2001/XMLSchema"<br/>
><br/>
<xs:element name="bookstore" type="bookstoreType" /><br/>
<xs:complexType name="bookstoreType <br/>
<xs:sequence maxOccurs="unbounded <br/>
<xs:element name="book" type="bookType </xs:element><br/>
</xs:sequence><br/>
</xs:complexType><br/>
<xs:complexType name="bookType <br/>
<xs:sequence><br/>
<xs:element name="title" type="xs:string" /><br/>
<xs:element name="author" type="authorName" /><br/>
<xs:element name="price" type="xs:decimal" /><br/>
</xs:sequence><br/>
<xs:attribute name="genre" type="xs:string" /><br/>
<xs:attribute name="publicationdate" type="xs:string" /><br/>
<xs:attribute name="ISBN" type="xs:string" /><br/>
</xs:complexType><br/>
<xs:complexType name="authorName <br/>
<xs:sequence><br/>
<xs:element name="first-name" type="xs:string" /><br/>
<xs:element name="last-name" type="xs:string" /><br/>
</xs:sequence><br/>
</xs:complexType><br/>
</xs:schema>
Now i am using this xsd file in XML file--->
<?xml version="1.0" encoding="utf-8" ?><br/>
<bookstore xmlns="http://www.books.org"<br/>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br/>
xsi:schemaLocation="file:///C:/Users/Varun/Documents/Visual%20Studio%202010/WebSites/XML/XMLSchema.xsd <br/>
<book abc="df" genre="anuj" publication ="1981" ISBN="1-861 <br/>
<dfff><br/>
<br/>
</dfff><br/>
</book><br/>
</bookstore>
Now according to the schema file ,this XMl should give me intelligence help and errors but its not showing.Why so?
View the full article