Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books 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
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 16th, 2003, 11:45 PM
Registered User
 
Join Date: Nov 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.NET 1.0 with VB.NET

This book has been a very useful reference. I am now using it in conjunction with Beginning XML (2nd Edition). I wanted to use ASP.NET's ValidatingReader to validate the samples in Beginning XML. On Page 798 of ASP.NET Namespace is a program to do this. It uses a DropDownList to select the XML file, but hardcodes the schema file. I thought I could also use a drop down list for the schema file. But I can't get it to work. I've used OnClick events to a) load the files and b) validate the xml file. When I validate, I get an error that: "Object reference not set to an instance of an object." It apparently refers to the XMLValidatingReader. THe code snippet is:

Dim strSchemaPath As String = Left(strCurrentPath, _
                          InStrRev(strCurrentPath, "\")) & _
                          SelSchemaFile.SelectedItem.Value


                          'create new XmlTextReader object and load Xml document
              objXTReader = New XmlTextReader(strXmlPath)
              objValidator = New XmlValidatingReader(objXTReader)
             objValidator.ValidationType = ValidationType.Schema

              Dim objSchemaCol As New XmlSchemaCollection()
             objSchemaCol.Add("", strSchemaPath)

             'assign the schema collection to the XmlValidatingReader
             objValidator.Schemas.Add(objSchemaCol)

The error is in the last line. Any help is appreciated on this or if you know another way to dynamically select the XML and schema file for validation.

Steve P.

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
ASP.NET 1.1,VB.NET,crystal reports, SQl server gvi Crystal Reports 1 September 11th, 2008 02:55 AM
send MASS Emails in ASP.NET 2 with VB.NET 2005 alexdcosta ASP.NET 2.0 Basics 1 July 17th, 2006 12:31 AM
Parse XML doc using VB.NET into ASP.NET page kwilliams Classic ASP XML 17 November 11th, 2005 10:42 AM
call window dialog component with asp.net/vb.net s3ng ASP.NET 1.x and 2.0 Application Design 0 June 21st, 2005 04:54 AM
Beginning ASP.Net Databases Using VB.Net ISBN 6195 tlamazares SQL Server ASP 1 December 15th, 2003 01:28 PM



All times are GMT -4. The time now is 04:12 AM.


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