XML validation problem, please help

Hi

I'm not usually one to post heaps of code in a forum post but im sorry to say that this is the only way I can show you my problem.

I'm stuck on this one! (I don't know much about XML)

I am getting the following exception message when running my XSD validation on an XML document: "cvc-elt.1: Cannot find the declaration of element 'mobile_message'."

Here is my Schema:

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

targetNamespace="http://url.co.nz/mobilechannel/schema/loginRequest"

elementFormDefault="qualified" xmlns:tns="http://url.co.nz/mobilechannel/schema/loginRequest">

<xsd:element name="mobile_message">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="request">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="login_request">

<xsd:complexType>

<xsd:attribute name="user_name" type="xsd:string"/>

<xsd:attribute name="password" type="xsd:string"/>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

<xsd:attribute name="application_version" type="xsd:string"/>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

And here is my XML document:

<mobile_message xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://url.co.nz/mobilechannel/schema/loginRequest" elementFormDefault="qualified" xmlns:tns="http://url.co.nz/mobilechannel/schema/loginRequest">

<request application_version="0.1">

<login_request user_name="sean" password="sean"/>

</request>

</mobile_message>

I'm hoping that someone out there can identify what I am doing wrong.

Thanks

[2515 byte] By [tinnya] at [2007-11-27 9:04:49]
# 1
Found the problemI needed to include my schema location.xsi:schemaLocation=' http://url.co.nz/mobilechannel/schema/loginRequest loginRequest.xsd'
tinnya at 2007-7-12 21:38:18 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...