M
mw
Hi,
I'd like to know if there is a way that I could create a new object for each
product in an XML file.
XML----------
<flavor id="vanilla">
<size>300ml</size>
<brand>coles</brand>
<prince>12.00</price>
</flavor>
------------
for instance, create a new class
public class Product
{
public string flavor
public string size
public string brand
public string price
}
So that after importing the XML, you could use the info like so:
vanilla.size;
Bit of a weird example, but its all I could think of, I must be hungry. Its
actually for a config file.
Thanks, I've been trying to get this to work all day, and I'm sure its quite
simple.
Matthew
I'd like to know if there is a way that I could create a new object for each
product in an XML file.
XML----------
<flavor id="vanilla">
<size>300ml</size>
<brand>coles</brand>
<prince>12.00</price>
</flavor>
------------
for instance, create a new class
public class Product
{
public string flavor
public string size
public string brand
public string price
}
So that after importing the XML, you could use the info like so:
vanilla.size;
Bit of a weird example, but its all I could think of, I must be hungry. Its
actually for a config file.
Thanks, I've been trying to get this to work all day, and I'm sure its quite
simple.
Matthew