Folks,
I'm bulletproofing. I'm using "XmlTextReader" to open and parse an XML file. This is working fine and dandy as show below:
I'm now bullet proofing. I don't like the way that the code above does not count for the possibity that "a.xml" mat not be there. Can anyone out there help me with this possibility i.e. is it possible to first detect if "a.xml" is present and if not throw a suitable error message?
Comments/suggestions/ideas/code-samples greatly appreciated,
Thank you,
G.
I'm bulletproofing. I'm using "XmlTextReader" to open and parse an XML file. This is working fine and dandy as show below:
VB.NET:
[size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] fxRatesFile [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.Xml.XmlTextReader[/size][size=2]
[/size][size=2][color=#008000][/color][/size]
[size=2][color=#008000]'Create the XML Reader[/color][/size]
[size=2][color=#008000][size=2]fxRatesFile = [/size][size=2][color=#0000ff]New[/color][/size][size=2] System.Xml.XmlTextReader("C:\a.xml")
[/size][/color][/size]
I'm now bullet proofing. I don't like the way that the code above does not count for the possibity that "a.xml" mat not be there. Can anyone out there help me with this possibility i.e. is it possible to first detect if "a.xml" is present and if not throw a suitable error message?
Comments/suggestions/ideas/code-samples greatly appreciated,
Thank you,
G.