When i am uploading a resume to the control, the content in the resume like Name, Mobile Number, Email
should be display in the text fields, for example, while a resume of a employee is uploaded, employee details
like Name, Email, Mobile Number etc., from the resume should be display in the resume.
Is it possible in Asp.net or MVC, with any open source tool.
using (WordprocessingDocument doc = WordprocessingDocument.Open(path, true))
{
MainDocumentPart mPart = doc.MainDocumentPart;
XmlDocument xmlDocument = new XmlDocument();
using (StreamReader reader = new StreamReader(mPart.GetStream()))
{
Document document = new Document();
document.Load(mPart);
document.Save(mPart);
System.Diagnostics.Process.Start(path);
// Value of operation attribute.
XDocument xDocument = XDocument.Load(XmlReader.Create(reader));
XNamespace w = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
// the elements we will be looking for data.
XName rPr = w + "pPr";
XName p = w + "p";
var query =( from element in xDocument.Descendants(p)
select new DocumentModel
{
ItemProperty = element.Element(rPr) != null ?
((from sElement in element.Descendants(rPr)
select new ItemProperty
{
Style = sElement.IsEmpty == false ?
(sElement.Element(w + "pStyle") != null ?
sElement.Element(w + "pStyle").Attribute(w + "val").Value :
string.Empty) : string.Empty,
Lang = sElement.IsEmpty == false ?
(sElement.Element(w + "lang") != null ?
(sElement.Element(w + "lang").Value ?? string.Empty) :
string.Empty) : string.Empty
}).First<ItemProperty>()) : null,
Text = element.Value == string.Empty ? "<br/>"
: element.Value
}).ToList();
model.EMP_NAME = query.ElementAt(0).Text.Trim(); // Getting Candidate Name
model.PHONE = query.ElementAt(1).Text; // Getting Candidate Mobile Number
model.EMAIL = query.ElementAt(2).Text.Trim(); // Getting Candidate Email
}
}
}
But, How can Search and Validate the Content with List, or in any other tool.Please help me someone. Thanks in Advance.