poorvi_tiwari 0 Newbie Poster

please help me HOW can i validate this xsd file named "product.xsd" and xml file productdetails.xml in the sofware "learning environment" ,the problem is when i try to validate these tow files by giving their paths it shows an error :"Automation server can't create object"
CODE - "product. xsd"
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name ="product" type="p"/>
<xsd:complexType name ="p">

<xsd:sequence>
<xsd:complexType name="p">
</xsd:sequence>

please help me to validate this files
<xsd:complexType name="p">
<xsd:sequence>
<xsd:element name ="name" type="xsd:string"/>
<xsd:element name = "Guarentee" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>


<xsd:sequence>
<xsd:complexType="orderdetails" type="o">
</xsd:sequence>

<xsd:complexType name="o">
<xsd:sequence>
<xsd:element name="orderno" type="xsd:integer"/>
<xsd:element name="quantity" type = "xsd:integer"/>
<xsd:element name="price" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>


and here is xml file named-"productdetails.xml"
<?xml version="1.0"?>

<product>
<name>pen</name>

<guarentee>six months</guarentee>

<orderdetails>

<orderno>259</orderno>
<quantity>200</quantity>
<price>50</price>
</orderdetails>
</product>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.