Thread: sorting nodes
View Single Post
  #1 (permalink)  
Old July 6th, 2009, 05:04 PM
scubin scubin is offline
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 10%
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: Jul 2009
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default sorting nodes

Hi all,

Please help me in figuring out how to code for this xml transformation
Thwe final outcome of the xml should contain all employee with highest salary from different TypeCde (Taking into Consideration all Employees nodes)
Please let me know if u have any questions

Below is the XML i have to transform:
<Company>
<Employees>
<employee >
<TypeCde>FN</TypeCde>
<salary>100000</salary>
</employee>
<employee>
<TypeCde>CL</TypeCde>
<salary>95000</salary>
</employee>
</Employees>
<Employees>
<employee>
<TypeCde>UH</TypeCde>
<salary>89000</salary>
</employee>
<employee>
<TypeCde>FN</TypeCde>
<salary>97000</salary>
</employee>
</Employees>
<Company>
Below is the xml i need after transformation


<Company>
<Employees>
<employee >
<TypeCde>FN</TypeCde>
<salary>100000</salary>
</employee>
<employee>
<TypeCde>CL</TypeCde>
<salary>95000</salary>
</employee>
<employee>
<TypeCde>UH</TypeCde>
<salary>89000</salary>
</employee>
</Employees>
</Comapny>


Thanks

Last edited by scubin : July 6th, 2009 at 05:09 PM.
Reply With Quote