Here's a portion of my xml file
<sources>
<comicbooks>
<source>
<profile>0</profile>
<name>Main</name>
<path>*mypath not showing*</path>
</source>
</comicbooks>
</sources>
I am also using a schema file for the sources.xml file.
Here's my code:
lbSources doesn't get populated with anything and Label2 doesn't change either.Code:Dim fileSources As IO.File If fileSources.Exists(filePath & "sources.xml") Then Try Dim Sources As XDocument = XDocument.Load(filePath & "sources.xml") lblSourcesStatus1.Text = "Sources file found and loaded!" lblSourcesStatus2.Text = "path: " & filePath & "sources.xml" For Each source As XElement In Sources...<sources>.<comicbooks>.<source> lbSources.Items.Add(source.<path>.Value) Label2.Text = source.<path>.Value Next Catch ex As Exception lblSourcesStatus1.Text = "Sources file found, but could not be loaded!" lblSourcesStatus2.Text = "path: " & filePath & "sources.xml" End Try Else lblSourcesStatus1.Text = "No sources file found!" lblSourcesStatus2.Text = "expected path: " & filePath & "sources.xml" End If
Please help.


Reply With Quote