daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Dec 19th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [XmlElement(ElementName = "PARENTNAME")]  
  2. public string PARENTNAME { get; set; }  //This is perfect mapped
  3. [XmlElement(ElementName = "DISPLAYCONTACT.CONTACTNAME")]
  4. public string DISPLAYCONTACTCONTACTNAME { get; set; } // This is not mapped
  5. [XmlElement(ElementName = "DISPLAYCONTACT.COMPANYNAME")]
  6. public string DISPLAYCONTACTCOMPANYNAME { get; set; }
  7.    
  8. XmlDocument doc = new XmlDocument();
  9.         doc.LoadXml(custome‌​rString);
  10.         StringWriter sw = new StringWriter();
  11.         XmlTextWriter xw = new XmlTextWriter(sw);
  12.         doc.WriteTo(xw);
  13.         String XmlString = sw.ToString();
  14.         string xmlToJson = JsonConvert.SerializeXmlNode(doc);
  15.         var deserialized = JsonConvert.SerializeXmlNode(doc);
  16.         var custome‌​r = new CusGetResIn();
  17.         custome‌​r= JsonConvert.DeserializeObject<CusGetResIn>(deserialized);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top