Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

XSLT group by attribute entries from list

$
0
0

I need somehow to group some info. This is the xml. I need to use xsl code  in order to group it properly 

<XMLLines>

<XMLLINE>

<Customer>1</Customer>

<Day> Monday </Day>

<Hour> 10:00 <Hour>

 </XMLLine>

<XMLLINE>

<Customer>2</Customer>

<Day> Monday</Day>

<Hour> 12:00 <Hour>

 </XMLLine>

<XMLLINE>

<Customer>1</Customer>

<Day> Tuesday</Day>

<Hour> 12:00 <Hour>

 </XMLLine>

</XMLines>

Output should look like

<Clients>

<Customer>

<Id> 1 </Id>

<Days>

<Day> Monday </Day>

<Hour> 10:00 <Hour>

<Day> Tuesday</Day>

<Hour> 12:00 <Hour>

</Days>

</Customer>

<Customer>

<Id> 2 </Id>

<Days>

<Day> Monday </Day>

<Hour> 12:00 <Hour>

</Days>

</Customer>

</Clients>

Thanks a lot guys




Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>