Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: XML in ASP.NET


Message #1 by steveproctor@c... on Sun, 1 Dec 2002 14:39:46
I've been working with ASP.NET and wanted to start using XML with ASP.NET 
applications.  The first project I've tried is using ASP.NET to validate a 
schema.  It's been very difficult.  I've tried various resources, 
including books like "Beginning ASP.NET Databases" from Wrox, books from 
other publishers, and the MSDN website.  

My general question is where in p2p would be a message board for posting 
questions?

My more specific question is how to validate a schema, and what's wrong 
with the following snippet.  In both cases, I'm only showing the first few 
lines.  The error I get is that [NAME OF ELEMENT] is not declared.  But 
they are declared, but are not recognized by the validator.

In the .XSD file:

<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema 
targetNamespace="http://localhost/stevepages/RMChecksSchema.xsd"
  xmlns="http://localhost/stevepages/RMChecksSchema.xsd"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://localhost/stevepages/RMChecksSchema.xsd" 
elementFormDefault="qualified"> 
[REMAINDER OF SCHEMA]

In the XML instance document:

<?xml version="1.0"?>
<checks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://localhost/stevepages/RMChecksSchema.xsd">
    	<check>
[REMAINDER OF XML]

Thanks for any help.

Steve

  Return to Index