Here's my XML:
<?xml version="1.0" ?>
<AppMode Type="Network">
<CurrentFolde r Path="c:\tabs">
<Tabs>
<FilePath>tabs\ Justin.tab</FilePath>
<FilePath>tabs\ Julie.tab</FilePath>
*****There could be 1 of these or 100....quantity can change*****
</Tabs>
</CurrentFolder>
</AppMode>
All I need to do is load "Network" and "c:\tabs" into variables. Then each
FilePath goes into an array.
The following code gives me everything but Julie.tab. It only gives me one
of the FilePaths. I'm not even sure if this is the right/best way to do
this:
Dim XMLReader As XmlTextReader = New XmlTextReader(" ")
XMLReader.White spaceHandling = WhitespaceHandl ing.None
XMLReader.Read( )
XMLReader.Read( )
MsgBox(XMLReade r.GetAttribute( "Type"))
XMLReader.Read( )
MsgBox(XMLReade r.GetAttribute( "Path"))
XMLReader.Read( )
While Not XMLReader.EOF *****Why isn't this looping?
XMLReader.Read( )
If Not XMLReader.IsSta rtElement() Then
Exit While
End If
MsgBox(XMLReade r.ReadElementSt ring("FilePath" ))
End While
XMLReader.Close ()
Any help would be greatly appreciated!
<?xml version="1.0" ?>
<AppMode Type="Network">
<CurrentFolde r Path="c:\tabs">
<Tabs>
<FilePath>tabs\ Justin.tab</FilePath>
<FilePath>tabs\ Julie.tab</FilePath>
*****There could be 1 of these or 100....quantity can change*****
</Tabs>
</CurrentFolder>
</AppMode>
All I need to do is load "Network" and "c:\tabs" into variables. Then each
FilePath goes into an array.
The following code gives me everything but Julie.tab. It only gives me one
of the FilePaths. I'm not even sure if this is the right/best way to do
this:
Dim XMLReader As XmlTextReader = New XmlTextReader(" ")
XMLReader.White spaceHandling = WhitespaceHandl ing.None
XMLReader.Read( )
XMLReader.Read( )
MsgBox(XMLReade r.GetAttribute( "Type"))
XMLReader.Read( )
MsgBox(XMLReade r.GetAttribute( "Path"))
XMLReader.Read( )
While Not XMLReader.EOF *****Why isn't this looping?
XMLReader.Read( )
If Not XMLReader.IsSta rtElement() Then
Exit While
End If
MsgBox(XMLReade r.ReadElementSt ring("FilePath" ))
End While
XMLReader.Close ()
Any help would be greatly appreciated!
Comment