eddy556
Member
- Joined
- May 14, 2007
- Messages
- 11
- Programming Experience
- 1-3
Hi,
I have a PDA application which reads customer details from an XML file called customers.xml. This works fine and I have complete programatical access to the file.
However I wish to adapt it to load another XML file instead, named trentassetdatadocument.xml. However upon doing this I get an error "System.IO.FileNotFoundException: Could not find file '\Program Files\XMLReaderTest\trentassetdatadocument.xml'
The funny thing is, both files are stored in the bin\Debug file of the application. However neither of the URLs of the files are \Program Files\XMLReaderTest\ even though one works. Thinking I had a duplicate file (stored at \Program Files\XMLReaderTest\) I changed some of the data, however on doing this the changes are reflected in the app.
I'm at at a complete loss here, any ideas whats going on?
I have placed both XML files here:
customers.xml
trentassetdatadocument.xml
The error occurs on load. The line is XmlDocument.Load("\Program Files\XMLReaderTest\(whichever file).xml")
I have a PDA application which reads customer details from an XML file called customers.xml. This works fine and I have complete programatical access to the file.
However I wish to adapt it to load another XML file instead, named trentassetdatadocument.xml. However upon doing this I get an error "System.IO.FileNotFoundException: Could not find file '\Program Files\XMLReaderTest\trentassetdatadocument.xml'
The funny thing is, both files are stored in the bin\Debug file of the application. However neither of the URLs of the files are \Program Files\XMLReaderTest\ even though one works. Thinking I had a duplicate file (stored at \Program Files\XMLReaderTest\) I changed some of the data, however on doing this the changes are reflected in the app.
I'm at at a complete loss here, any ideas whats going on?
I have placed both XML files here:
customers.xml
VB.NET:
<?xml version="1.0" standalone="yes" ?>
<customers>
<customer visited="no">
<id>506</id>
<name>
<firstname>Reg</firstname>
<lastname>Kemp</lastname>
</name>
</customer>
<customer visited="yes">
<id>329</id>
<name>
<firstname>Kerry arse</firstname>
<lastname>Gorblimey</lastname>
</name>
</customer>
</customers>
trentassetdatadocument.xml
VB.NET:
<?xml version="1.0" standalone="yes"?>
<Data>
<EPCData>
<EPC1>0</EPC1>
<EPC2>00000</EPC2>
<EPC3>0007</EPC3>
<EPC4>7DC24E</EPC4>
</EPCData>
<EPCData>
<EPC1>0</EPC1>
<EPC2>00500</EPC2>
<EPC3>0000</EPC3>
<EPC4>121743</EPC4>
</EPCData>
</Data>
The error occurs on load. The line is XmlDocument.Load("\Program Files\XMLReaderTest\(whichever file).xml")