XMLTextReader not reading

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • edamron

    #1

    XMLTextReader not reading

    I wish to use a simple xml file as a configuration file for a small
    application. The application writes a default xml file if it doesn't
    find the configuration file but when it reads the file it doesn't
    return any values. I have verified that the file is there and in the
    place the code expects it to be.

    The code that reads the file:
    Private Sub ReadConfig()
    Dim s As String = Application.Sta rtupPath() +
    "\TranscriptArc hiveConfig.xml"
    Dim xmlReader As XmlTextReader = New XmlTextReader(s )

    xmlReader.MoveT oContent()
    days = xmlReader.GetAt tribute("DaysFi naled")
    destinationPath = xmlReader.GetAt tribute("Destin ationPath")
    originalTranscr iptPath =
    xmlReader.GetAt tribute("Origin alTranscriptPat h")
    originalPre94Pa th = xmlReader.GetAt tribute("Origin alPre94Path")
    size = xmlReader.GetAt tribute("MediaS ize")
    serverName = xmlReader.GetAt tribute("Server Name")
    databaseName = xmlReader.GetAt tribute("Databa seName")
    xmlReader.Close ()
    End Sub


    The xml file:

    <TranscriptArch iveConfiguratio n>
    <GeneralConfigu ration DaysFinaled="60 "
    DestinationPath ="C:\MoveTrans\ " OriginalTranscr iptPath="Z:\Tra ns\"
    OriginalPre94Pa th="Z:\Trans\Pr e94\" MediaSize="650" />
    <DatabaseConfig uration ServerName="bii adboly04" DatabaseName="B AIS"
    />
    </TranscriptArchi veConfiguration >

    Thanks for any help.

Working...