Advertisement

04.25.2008 at 06:43AM PDT, ID: 23353444 | Points: 20
[x]
Attachment Details

Getting data from an xml file in visual basic.net

Asked by hmcgeehan in Extensible Markup Language (XML), Programming for ASP.NET, Microsoft Visual Basic.Net

Hi

I have an xml file that simply stores the names of a few rooms.

In visual basic.net I try to loop through those values and write them out.

I'm almost there ...

 Dim xmlFilePath As String
            xmlFilePath = Server.MapPath("~") + "/Rooms.xml"
            Dim rooms As New DataSet()
            rooms.ReadXml(xmlFilePath)


            For Each column As DataColumn In rooms.Tables(0).Columns
                Response.Write ???
            Next


Thanks!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
<?xml version="1.0" encoding="utf-8" ?>
<Rooms>
	<Room Name="Kitchen"></Room>
	<Room Name="Bedroom 1"></Room>
	<Room Name="Bedroom 2"></Room>
...............
</Rooms>
[+][-]04.25.2008 at 07:19AM PDT, ID: 21439818

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 07:23AM PDT, ID: 21439849

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 08:23AM PDT, ID: 21440468

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628