varavoorvishnu
Programmer
- Sep 9, 2002
- 45
Hi,
I hv a problem in testing a sample Schema with XML.
My sample XML is as follows:
InputFile.xml
---------------
<?xml version="1.0" ?>
<Request xmlns:xsi=" xsi:schemaLocation="'Employee.xsd">
<sqlaction value="insert">
<EmpDetails>
<Empid>10</Empid>
</sqlaction>
</Request>
and My Schema file Employee.xsd reads as follows:
Employee.xsd
--------------
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="<xs:element name="EmpDetails">
<xs:complexType>
<xs:sequence>
<!-- Employee ID -->
<xs:element name="Empid" type="integer"> </xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Now in the InputFile.xml if I give some character value for the element "Empid",the xml file is supposed to throw an error which doesnt take place.It just refreshes as it is.Please help with some other alternative or correction if required.
Regards,
Vishnu
I hv a problem in testing a sample Schema with XML.
My sample XML is as follows:
InputFile.xml
---------------
<?xml version="1.0" ?>
<Request xmlns:xsi=" xsi:schemaLocation="'Employee.xsd">
<sqlaction value="insert">
<EmpDetails>
<Empid>10</Empid>
</sqlaction>
</Request>
and My Schema file Employee.xsd reads as follows:
Employee.xsd
--------------
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="<xs:element name="EmpDetails">
<xs:complexType>
<xs:sequence>
<!-- Employee ID -->
<xs:element name="Empid" type="integer"> </xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Now in the InputFile.xml if I give some character value for the element "Empid",the xml file is supposed to throw an error which doesnt take place.It just refreshes as it is.Please help with some other alternative or correction if required.
Regards,
Vishnu