Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 21st, 2004, 03:03 PM
Authorized User
 
Join Date: Jul 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to brettdavis4
Default Reading XML in ASP.net

I am making a small guestbook application using ASP.net and XML. I can write to it fine. But I get an error when I try to read the file.

This is the error that I get:

The schema namespace is invalid. Please use this one instead: http://www.w3.org/2001/XMLSchema.

This is my XML file:

<Guests xmlns="http://tempuri.org/guest.xs">
  <guest>
    <name>test</name>
    <email>[email protected]</email>
    <website>test</website>
    <date>8/15/2004 10:32:09 PM</date>
    <comments>test</comments>
    <relation>Friend</relation>
  </guest>
  <xs:schema id="Guests" targetNamespace="http://tempuri.org/guest.xs" xmlns:mstns="http://tempuri.org/guest.xsd" xmlns="http://tempuri.org/guest.xs" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified">
    <xs:element name="Guests" msdata:IsDataSet="true" msdata:EnforceConstraints="False">
      <xs:complexType>
        <xs:choice maxOccurs="unbounded">
          <xs:element name="guest">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="name" type="xs:string" minOccurs="0" />
                <xs:element name="email" type="xs:string" minOccurs="0" />
                <xs:element name="website" type="xs:string" minOccurs="0" />
                <xs:element name="date" type="xs:string" minOccurs="0" />
                <xs:element name="comments" type="xs:string" minOccurs="0" />
                <xs:element name="relation" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
</Guests>

Please help me out.

Thanks,

Brett

 
Old August 22nd, 2004, 08:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Do you have the XML and schema file in the same file?

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading XML through ASP jeffm_22 Classic ASP XML 3 June 11th, 2010 07:02 AM
Reading XML file using ASP itHighway XSLT 2 April 29th, 2006 04:52 AM
Reading an XML post in an ASP.NET web site spudgun2005 ASP.NET 1.0 and 1.1 Basics 0 November 3rd, 2005 05:40 PM
Reading XML from ASP texasraven Classic ASP XML 2 February 26th, 2004 03:26 PM
Reading XML using VB.NET juice VB.NET 1 July 16th, 2003 03:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.