Oxygen XML Editor
 
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Find the node with maximum elements


Subject: [xsl] Find the node with maximum elements
From: Avaneesh Ramprasad <avaneesh@xxxxxxxxxxxxxx>
Date: Sat, 3 Nov 2007 12:05:10 -0700 (PDT)

Hello,
I have a requirement to write a xsl transformation to find the node which has the maximum number of elements

Below is a sample xml file 

<Sample>
    <Toyota>
          <Car>Camry</Car>
          <Car>Corrola</Car>
     </Toyota>
     <Honda>
            <Car>Accord></Car>
          <Car>Civic</Car>
          <Car>Pilot</Car>
     </Honda>
     <Mitsubishi>
        <Car>Lancer</Car>
        <Car>Lancer</Car>
        <Car>Lancer</Car>
     </Mitsubishi>
    <Hyundai>
        <Car>Sonata</Car>
        <Car>Accent</Car>
</Hyundai>
</Sample>

The xsl should return Honda and Mitsubishi

Would appreciate your help.

Thanks
Avaneesh


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor
Keywords