c# - Custom XML convert with mapping -
i have xml string below.
<root> <row> <productname>peterson</productname> <productimageurl>gina henry</productimageurl> <ontop>false</ontop> <key/> <onscan>false</onscan> <productcode/> <brandname> <productbrand>annie jones</productbrand> </brandname> <productcategory>new category</productcategory> <productdescription>mcintyre jeanne lucas</productdescription> </row> <row> <productname>peterson</productname> <productimageurl>gina henry</productimageurl> <ontop>false</ontop> <key/> <onscan>false</onscan> <productcode/> <brandname> <productbrand>annie jones</productbrand> </brandname> <productcategory>new category</productcategory> <productdescription>mcintyre jeanne lucas</productdescription> </row> </root>
my mapping parameter in json like.
{'title':'%productname%','secondarykey':'%key%','isscannable':'%onscan%','imageurl':'https://www.pic.com/image/%productimageurl%.png','istop':'%ontop%','category':'%productcategory%','supplier':'supplier %brandname>productbrand%','description':'%productdescription%','barcode':'%productcode%'}
i have database model , mapping likes.
public class customimportproducts:baseentity { public string title { get; set; } public string barcode { get; set; } public string description { get; set; } public string quantity { get; set; } //.....
i need map xml list of class object. have not idea how that. have done same json data not understand how xml data.
Comments
Post a Comment