I have this existing XML file serving as a template with NO data, just simple nodes... here's a sample:
<?xml version="1.0" encoding="utf-8" ?>
<catalog>
<cd>
<title />
<artist />
<country />
<company />
<price />
<year />
</cd>
</catalog>
Now I have created a similar class for it.
public class Cd
{
public string Title { get; set; }
public string Artist { get; set; }
public string Country { get; set; }
public string Company { get; set; }
public string Price { get; set; }
public string Year { get; set; }
}
The purpose is this:
- Put values on the properties of the
var cd = new Cd();object - Get the existing XML file (template) then pass the values in it (like mapping the object to the existing XML)
- Transform the XML template(with values) into XSLT to become HTML
I think that's all.
How to properly do this? Thanks a lot!