I am trying to map external xml documents to a class in dotnet.
The problem is that the elements of the input xml will have different
names than the properties of the class.
How do I create the xslt that will allow me to transform the inbound
xml into another xml resource with the elements renamed so that I can
serialize it to an instance of the class.
I assume that this is best done with xslt.transform, but I am not sure
how to write the xslt.
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<Customer>
<nameFirst>Joe</nameFirst>
<nameLast>Schmoe</nameLast>
<addrCity>Bigtime</addrCity>
<addrState>NY</addrState>
<addrStreet>100 E Main Street</addrStreet>
<addrZIP>100014</addrZIP>
<otherfield>25</otherfield>
</Customer>
</NewDataSet>
public class Cust
{
public Cust()
{ }
public string FirstName;
public string LastName;
public string City;
public string State;
public string Zip;
}
Thanks,
Pint