Folks,
I'm using a while statement and EOF attribute to scroll through and XML file that I have opened.
Problem is though I don't think it scrolling through the XML file? For the life of me I don't know why - can anyone help please?
Thanks
G.
I'm using a while statement and EOF attribute to scroll through and XML file that I have opened.
Problem is though I don't think it scrolling through the XML file? For the life of me I don't know why - can anyone help please?
Thanks
G.
VB.NET:
[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][color=#008000]'Create the XML Reader
[/color][/size][size=2]fxRatesFile = [/size][size=2][color=#0000ff]New[/color][/size][size=2] System.Xml.XmlTextReader("C:\fx-rates.xml")[/size]
[size=2]fxRatesFile.WhitespaceHandling() = System.Xml.WhitespaceHandling.None
[/size][size=2][color=#0000ff]While[/color][/size][size=2][color=#0000ff]Not[/color][/size][size=2] fxRatesFile.EOF
fxRatesFile.Read()
[/size][size=2][color=#0000ff]If[/color][/size][size=2] "base".Equals(fxRatesFile.Name) [/size][size=2][color=#0000ff]And[/color][/size][size=2] _[/size]
[size=2]baseCurrency.Equals(fxRatesFile.GetAttribute("iso-alpha")) [/size][size=2][color=#0000ff]Then[/color][/size]
[color=#0000ff] [/color]
[size=2][color=#0000ff] [/color]fxRate = "success"[/size]
[size=2][color=#0000ff]Exit[/color][/size][size=2][color=#0000ff]While
[/color][/size][size=2][color=#0000ff]
[/color][/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]While[/color][/size]