Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
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 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 June 4th, 2006, 01:51 PM
Authorized User
 
Join Date: Dec 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Simple Problem

To any that can help thank you!

I have created a simple VB.NET windows form to read data from an xml document. I added and created the xml document to the project by right clicking the project and then clicking on add item, then selecting xml file.

I then went in and typed in a few elements that consist of names and addresses. When I ran my application I got the following error:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in system.xml.dll

Additional information: Could not find file "C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\ParsingXML\bin\PubsAuthors.xml".

My application cannot find the file even though it is in the project.

And I did properly refer to the file with this line of code:

Dim XMLAuths As New Xml.XmlTextReader("PubsAuthors.xml")

Any help would be appreciated.

Little Shell


 
Old June 5th, 2006, 06:59 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Are you sure the file is in the bin subfolder?
You're running as administrator, perhaps it's a rights issue, try moving the file to different folder outside of the project and specify the full path to the file.

--

Joe (Microsoft MVP - XML)
 
Old June 5th, 2006, 03:30 PM
Authorized User
 
Join Date: Dec 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Joe,

Thank you for your reply. I moved the file into the bin folder and worked just great. My only question is why must the XML file be placed in the bin folder?

Thanks for your assistance,

Little Shell






Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple != problem akentanaka XSLT 3 October 13th, 2008 11:54 PM
A Simple Problem paole Wrox Book Feedback 7 July 23rd, 2007 08:55 PM
Simple problem rsa3des Classic ASP Basics 4 August 8th, 2005 06:14 PM
a simple problem aquarius XSLT 1 February 27th, 2004 06:17 AM
Simple Problem bsdb3 Java GUI 2 February 5th, 2004 09:05 PM





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