View Single Post
Old Sep 28th, 2004, 2:01 PM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
If you have more on each info on each line, one way you could do it is have an awk function in your shell script that parses each line and extracts the attribute... for comparison in the 'workload' section of your script.

For instance:

After a line is read in from the data file... send it to the awk script.
The awk script looks for <, if it finds it... it reads the name of the attribute until the ending tag >. This gathers 'Activies' into a variable used for comparison in which you generate the new file until you find the closing attribute tag </Activies>.... etc. Read file, get line into variable, parse the line variable for the XML attribute tags.. generate new file where needed, etc.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote