To get values from the InfoPath xml , their are two values
1. By promoting the values of InfoPath form to form library and get that values by using SPObject and SPListItemObject.
2. Is that is below :
SPWeb _web = SPContext.Current.Web;
string temXml = _web.GetFileAsString("Idea Forms/Formulate.xml");
XmlDocument xDoc = new XmlDocument();
xDoc.LoadXml(temXml);
XmlNamespaceManager ns = new XmlNamespaceManager(xDoc.NameTable);
ns.AddNamespace("my", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-02-08T09:24:40");
string strSampleValue = xDoc.SelectSingleNode("//my:myfield", ns).InnerText;