[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL to analyse some XML log files
Hello experts, not knowing a lot about XSL, I am wondering if some of you experts could help me with the following. I have a XML file of the following form. It represents a log file that contrains a very high number of logs (represented by the <log> XML tag) from a system and some user actions (here very simplified): <logfile> <log> <time>1</time> <change>mode TEST</change> </log> ... some more logs ... <log> <time>23</time> <change>mode A</change> </log> ... some more logs ... <log> <time>45</time> <useraction><type>botton<type><name>start</name></useraction> </log> ... some more logs ... <log> <time>66</time> <useraction><type>botton<type><name>stop</name></useraction> </log> <log> <time>78</time> <change>mode B</change> </log> ... some more logs ... <log> <time>123</time> <useraction><type>botton<type><name>start</name></useraction> </log> ... some more logs ... <log> <time>145</time> <useraction><type>botton<type><name>stop</name></useraction> </log> ... some more logs ... </logs> The basic idea here is that the logs that have a <change> XML tag define a certain system mode. I would like to extract information based on that. The XML file only has this flat sturcture which makes it more complicatied then if all <useraction> tags would be child nodes of the relevant <change> tag. I would like to do the following and hope that you can help me: 1) Generate another XML file that does not contain logs (<log> tag defines a log) that belong to the test mode (<change> tag with value "mode TEST"). That means all log files between the test mode and any other mode. 2) Generate one XML file for each mode, one for "mode TEST", one of "mode A", one for "mode B") with all the logs that belong to each mode. That means e.g. that all the logs after <change>mode B</change> are stored into the "mode B" file, equeally for the others. 3) Calcuate the time difference in seconds (<time> value is also provide in seconds) between the <useraction>Start</useraction> and the <useraction>Stop</useraction> of the "mode A". Any help is appreciated, Karl -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|