Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old May 3rd, 2007, 09:12 AM
Registered User
Join Date: May 2007
Location: , , Australia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alz6z
Default XML validation error

<- - - - - - - - -- - - - - - - - -- - - - - - - - -- - - - - - - - -- - - >
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="test.xsl"?>
<insurance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test.xsd">
        <address>george st</address>
            <additionalaccessories>car alarm</additionalaccessories>


XML schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

<xs:element name= "insurance">

            <xs:element name="quote" maxOccurs ="unbounded">

                        <xs:element name="DriverDetails">

                                    <xs:element name="fullname">
                                                <xs:element name="LastName" type="xs:string"/>
                                                <xs:element name="FirstName" type="xs:string"/>

                                    <xs:element name="DOB" type="xs:string"/>
                                    <xs:element name="gender" type="xs:string"/>
                                    <xs:element name="contact" type="xs:integer"/>
                                    <xs:element name="address" type="xs:string"/>
                                    <xs:element name="postcode" type="xs:integer"/>
                                    <xs:element name="previous_insured" type="xs:string"/>


                    <xs:element name="cardetails">
                                <xs:element name="insurancetype" type="xs:string"/>
                                <xs:element name="carmaker" type="xs:string"/>
                                <xs:element name="year" type="xs:string"/>
                                <xs:element name="transmissiontype" type="xs:string"/>
                                <xs:element name="carmodel" type="xs:string"/>
                                <xs:element name="Bodytype" type="xs:string"/>
                                <xs:element name="cylinders" type="xs:string"/>
                                <xs:element name="additionalaccessories" type="xs:string"/>

                    <xs:element name="Driverhistory">
                                <xs:element name="license" type="xs:integer"/>
                                <xs:element name="licenseaccured" type="xs:integer"/>
                                <xs:element name="accidents" type="xs:integer"/>
                                <xs:element name="suspension" type="xs:yesnostring"/>
                                <xs:element name="theft" type="xs:yesnostring"/>
                                <xs:element name="claims" type="xs:yesnostring"/>

            <xs:element name = "quoteno" type="xs:integer"/>
            <xs:element name = "Date" type="xs:string"/>
            <xs:element name = "time" type="time"/>

                    <xs:element name="price">
                                <xs:element name="insuredprice" type="xs:float"/>
                                <xs:element name="extras" type="xs:float"/>
                                <xs:element name="discounts" type="xs:float"/>
                                <xs:element name="total" type="xs:float"/>



hi guys, i am new in this forum
i need help with my xml...i keep getting the error msgs "the element 'insurance' is used but not declared in th dtd/schema"
my xml is well formed but i still dont know what the problem is...please help me.

Reply With Quote
  #2 (permalink)  
Old May 3rd, 2007, 12:06 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

Well the XML you've shown is referring to a no-namespace schema although the schema shown is targeting the http://www.w3schools.com namespace.


Joe (Microsoft MVP - XML)
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML validation error message breithauptj XML 3 March 19th, 2008 02:40 PM
XML validation with XSD ksskumar XML 0 October 12th, 2007 05:46 AM
XML Validation AdamPengelly C# 4 September 8th, 2006 07:36 AM
XML Validation June XML 5 February 17th, 2004 11:41 AM
xml validation error kreddy XML 0 August 20th, 2003 01:16 AM

All times are GMT -4. The time now is 05:08 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.