using System.Collections;
using System.Collections.Generic;
using System.Data.DataSetExtensions;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using System.Globalization;
using System.Diagnostics;
public static void Main()
string input = @"<HUMAN_VERIFICATION xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
<MESSAGE>successful</MESSAGE>
<CONTACT_NUMBER>3120202456011</CONTACT_NUMBER>
<DATE_OF_BIRTH>10-9-1982</DATE_OF_BIRTH>
<BIRTH_PLACE>Washington</BIRTH_PLACE>
<EXPIRY>2020-12-15</EXPIRY>
<CARD_TYPE>idcard</CARD_TYPE>
XDocument doc = XDocument.Parse(input);
var results = doc.Descendants("PERSON_DATA")
NAME = (string)x.Element("NAME"),
DATE_OF_BIRTH = (string)x.Element("DATE_OF_BIRTH"),
BIRTH_PLACE = (string)x.Element("BIRTH_PLACE"),
EXPIRY = (string)x.Element("EXPIRY"),
foreach(var result in results)
Console.WriteLine("{0}, {1}, {2}, {3}",result.NAME,result.DATE_OF_BIRTH,result.BIRTH_PLACE,result.EXPIRY);