I'm trying to create an XML document from a C# ArrayList that contains redundant data.
IE:
IT
Employee Name
IT
Systems
Employee Name
IT
Systems
Employee Name
IT
Business Applications
Emplyoee Name
IT
Business Applications
Emplyoee Name
Legal
Emplyoee Name
and I want to create an XML Document in this order:
<IT>
-<EmployeeName>Mary Lee</EmployeeName>
-<Systems>
-----<EmployeeName>Joe Smo</EmployeeName>
-----<EmployeeName>Steve Perry</EmployeeName>
-</Systems>
-<Business Applications>
-----<EmployeeName>So On</EmployeeName>
-----<EmployeeName>So Forth</EmployeeName>
-</Business Applications>
</IT>
<Legal>
-----<EmployeeName>Harry Mary</EmployeeName>
...
(Notice how some data isn't necessarily the same "depth")
I believe I need to use DataTables and create table relationships, but I do not know if I need a table for each child, that would take a lot of work, and I'm sure there's an easier way.
IE:
IT
Employee Name
IT
Systems
Employee Name
IT
Systems
Employee Name
IT
Business Applications
Emplyoee Name
IT
Business Applications
Emplyoee Name
Legal
Emplyoee Name
and I want to create an XML Document in this order:
<IT>
-<EmployeeName>Mary Lee</EmployeeName>
-<Systems>
-----<EmployeeName>Joe Smo</EmployeeName>
-----<EmployeeName>Steve Perry</EmployeeName>
-</Systems>
-<Business Applications>
-----<EmployeeName>So On</EmployeeName>
-----<EmployeeName>So Forth</EmployeeName>
-</Business Applications>
</IT>
<Legal>
-----<EmployeeName>Harry Mary</EmployeeName>
...
(Notice how some data isn't necessarily the same "depth")
I believe I need to use DataTables and create table relationships, but I do not know if I need a table for each child, that would take a lot of work, and I'm sure there's an easier way.