Read XML with C#

Hi,

I'm new to C# (coming from basic VB .Net and Java). I have made some classes to generate possible combinations for solar panels and solar inverters. Now I would like to get the source data from an XML file.

The XML file would look a little like this:

[color=Blue]<?xml verson="1.0" ?>


REC220AE
REC
AE
REC220AE
220
60
1000

[/color]

The thing is: I only need to read the file. Writing the file could be programmed later on, but for now, writing a basic xml file in notepad would do fine.

The values should be put into variables. (string, int, Single) that would be used as parameters for the initialisation of objects.

Could somebody tell me how to read this file (using the element names?).

Thanks in advance!

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories