validate error
Then i serialize it to disk as wdwebsvc.xml
Then i run XSD.EXE and generate the 2 below .xsd files.
So when i then attempt to validate the xml with the xsd file, i get the below error.
Whats wrong? I am so confused?
Peter
got exception The global element 'http://tempuri.org/WDWEBSVC.xsd:OurRootClass' has already
been declared. An error occurred at
file:///C:/JUNK/DEV/WATCHDOG/WDWEBSVC/WDCLIENT/bin/Debug/WDWEBSVC.XSD, (4, 4).
--------
wdwebsvc.xml:
<?xml version="1.0" encoding="utf-8"?>
<OurRootClass xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://tempuri.org/WDWEBSVC.xsd">
<Items>
<Item>
<strItemName xmlns="http://www.aspnetsbs.com/webservices/">Ping Nifty
Tools</strItemName>
<strItemAddress
xmlns="http://www.aspnetsbs.com/webservices/">www.niftytools.com</strItemAddress>
</Item>
<Item>
<strItemName xmlns="http://www.aspnetsbs.com/webservices/">Html download Nifty
Tools</strItemName>
<strItemAddress
xmlns="http://www.aspnetsbs.com/webservices/">http://www.niftytools.com</strItemAddress>
</Item>
</Items>
</OurRootClass>
--------
WDWEBSVC.xsd:
<?xml version="1.0" encoding="utf-8"?>
<OurRootClass xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://tempuri.org/WDWEBSVC.xsd">
<Items>
<Item>
<strItemName xmlns="http://www.aspnetsbs.com/webservices/">Ping Nifty
Tools</strItemName>
<strItemAddress
xmlns="http://www.aspnetsbs.com/webservices/">www.niftytools.com</strItemAddress>
</Item>
<Item>
<strItemName xmlns="http://www.aspnetsbs.com/webservices/">Html download Nifty
Tools</strItemName>
<strItemAddress
xmlns="http://www.aspnetsbs.com/webservices/">http://www.niftytools.com</strItemAddress>
</Item>
</Items>
</OurRootClass>
--------
wdwebsvc_app1.xsd:
<?xml version="1.0" standalone="yes"?>
<xs:schema id="OurRootClass" targetNamespace="http://www.aspnetsbs.com/webservices/"
xmlns:mstns="http://tempuri.org/WDWEBSVC.xsd" xmlns="http://www.aspnetsbs.com/webservices/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified"
elementFormDefault="qualified" xmlns:app1="http://www.aspnetsbs.com/webservices/">
<xs:import namespace="http://tempuri.org/WDWEBSVC.xsd" schemaLocation="wdwebsvc.xsd" />
<xs:element name="strItemName" type="xs:string" />
<xs:element name="strItemAddress" type="xs:string" />
</xs:schema>

