I need to take in a text document from a server and create an XML hierarchy from it in order to use it in a C# program.
It will be an organizational hierarchy. Here is the same of the text file:
EmployeeID; Employee Name; SupervisorID
1; Bob; 3
2; Mark; 1
3; Jill; 0
4; Ann ; 1
Where the above relationships would be:
Bob's boss is Jill. Mark's boss is Bob, and Jill has no boss.
I want to create an XML file from that data to look something like this:
<Employee> Jill
<Employee> Bob
<Employee> Mark </Employee>
<Employee> Ann </Employee>
</Employee>
</Employee>
I don't know if this makes sense, because I have never worked with C# or XML before.
Feel free to change how the tags are named, the main things I will need to do:
Be able to get the names of everyone supervised by the same person. (Ex: Mark would want Mark and Ann)
Be able to get the names of all supervisors above an employee (Ex: Mark's would be Bob and Jill)
Be able to get the names of all people under then (Ex: Mark would have nobody, Jill would have everybody, Bob would have Mark and Ann)
I've looked at XElement and XDoc and various tutorials and SO questions but most of the SO questions are too advanced for me at this point, and most of the tutorials aren't trying to create a hierarchy like mine.