[xsd-users] cxx-tree failing generated xml file
Michael Kesler
mkesler at datawolf.cc
Wed Jun 13 11:52:02 EDT 2007
This is my first post here, and please forgive me if this
question/problem is already posted. I tried finding this in Google and
came up with nothing exactly relevant.
I have one application which writes an XML configuration file, which is
read by another application. Both applications use the XSD generated
classes, the first writing the data and the second reading the data.
When I try to read the data, I get these exceptions:
* settings.xml:2:181 error: Unknown element 'Settings'
* settings.xml:2:181 error: Attribute 'xmlns' is not declared for
element 'Settings'
* settings.xml:2:181 error: Attribute
'{http://www.w3.org/2000/xmlns/}xsi' is not declared for element
'Settings'
* settings.xml:2:181 error: Attribute
'{http://www.w3.org/2001/XMLSchema-instance}schemaLocation' is not
declared for element 'Settings'
* settings.xml:4:8 error: Unknown element 'dsn'
* settings.xml:6:9 error: Unknown element 'user'
* settings.xml:9:13 error: Unknown element 'password'
What I don't understand is that the xsd-generated classes are writing
this XML file that it can't read.
The following is my XSD:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="settings"
targetNamespace="http://kysorpanel.com/STEP1/settings"
elementFormDefault="qualified"
xmlns="http://kysorpanel.com/STEP1/settings"
xmlns:mstns="http://kysorpanel.com/STEP1/settings"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Settings_type">
<xs:sequence>
<xs:element name="dsn" type="xs:string"
default="FILEDSN=C:\DSN\Database.dsn" />
<xs:element name="user" type="xs:base64Binary" default="" />
<xs:element name="password" type="xs:base64Binary" default="" />
</xs:sequence>
</xs:complexType>
<xs:element name="Settings" type="Settings_type" />
</xs:schema>
Any assistance will be greatly appreciated.
~Michael
More information about the xsd-users
mailing list