A
ad
There are four areas in my company , every employees in my company have his
duty area.
I use a select join statement to make a view form Area and Employee table
like below.
I want to make a hierarchical XML form the view.
The XML is like below
How can I do?
the view:
Area Employee
----------------------------------------
North Mary
North John
North Max
East Kai
West Jina
West John
South Tim
South Peter
the hierarchical XML
<?xml version="1.0"?>
<AreaEmployee>
<Area>
North
<Employee>
Mary
</Employee>
</Area>
<Area>
North
<Employee>
John
</Employee>
</Area>
<Area>
North
<Employee>
Max
</Employee>
</Area>
<Area>
East
<Employee>
Kai
</Employee>
</Area>
<Area>
West
<Employee>
Jina
</Employee>
</Area>
,,..............................
</AreaEmployee>
duty area.
I use a select join statement to make a view form Area and Employee table
like below.
I want to make a hierarchical XML form the view.
The XML is like below
How can I do?
the view:
Area Employee
----------------------------------------
North Mary
North John
North Max
East Kai
West Jina
West John
South Tim
South Peter
the hierarchical XML
<?xml version="1.0"?>
<AreaEmployee>
<Area>
North
<Employee>
Mary
</Employee>
</Area>
<Area>
North
<Employee>
John
</Employee>
</Area>
<Area>
North
<Employee>
Max
</Employee>
</Area>
<Area>
East
<Employee>
Kai
</Employee>
</Area>
<Area>
West
<Employee>
Jina
</Employee>
</Area>
,,..............................
</AreaEmployee>