PDA

Click to See Complete Forum and Search --> : Perl and XML


JafferAB
Jun 15th, 2003, 04:04 PM
right, ive just embarked on a little plan to make a web page log out of all my trillian information (trillian beinbg the program i use for MSN, ICQ etc).

Im trying to create for each person on my list...

- their email
- their name
- the log size (thus dictating how much i speak to them)
- a random quote from the file

i dont know how to get the random quote, yet, but im sure thatll be pretty standard filey stuff which i can work out - however im very stuck on the part where i hav to find there name.

You see trillian holds your "buddy list" in an XML format in the structure...

- <group expanded="1">
<title>NYT</title>
<buddy uri="MSN:1%3Adebraberber%40hotmail%2Ecom%3ADeborah%3A1">Deborah</buddy>
<buddy uri="MSN:1%3Agb_lawsonconquer%40hotmail%2Ecom%3AGrace%20Conquer%3A1">Grace%20Conquer</buddy>
<buddy uri="MSN:1%3Aai_li567%40hotmail%2Ecom%3AHeather%3A1">Heather</buddy>
<buddy uri="MSN:1%3Anottslad75%40hotmail%2Ecom%3AJoe%20Shaw%3A1">Joe%20Shaw</buddy>
<buddy uri="MSN:1%3Abemyguestbemyguestputmybanquettothetest%40hotmail%2Ecom%3ALois%3A1">Lois</buddy>
<buddy uri="MSN:1%3Aiwannabeaflutterby%40hotmail%2Ecom%3ALois%3A1">Lois</buddy>
<buddy uri="MSN:1%3Alucyjuice_99%40hotmail%2Ecom%3ALucy%3A1">Lucy</buddy>
<buddy uri="MSN:1%3Amatt_in_da_house%40hotmail%2Ecom%3AMatthew%20Day%3A1">Matthew%20Day</buddy>
<buddy uri="MSN:1%3Ar_is4rachel%40ntlworld%2Ecom%3ARachel%3A1">Rachel</buddy>
<buddy uri="MSN:1%3Arachelking%40lineone%2Enet%3ARachel%3A1">Rachel</buddy>
<buddy uri="MSN:1%3Arainyday_mushroompillow%40hotmail%2Ecom%3AGrace%20Conquer%3A1">Grace%20Conquer</buddy>
<buddy uri="MSN:1%3Ashmowat%40hotmail%2Ecom%3ATom%20Mowat%3A1">Tom%20Mowat</buddy>
<buddy uri="MSN:1%3Ajoeakapromking%40hotmail%2Ecom%3AJoe%3A1">Joe</buddy>
</group>

and the log files in the way...

blackbulletstar@hotmail.com.log

Now i can get the email of the people in the MSN directory, all of them - i can already get the file size - and ill be able to work out how to upload it and write all the dat to a HTML file - however, im having a lot of problems working out how to make PERL read the XML file, take the email address and name, put it in an associative array and compare it to the name of the files!!!

ive tryed to explain this as best as possible! if you need any more info plz just ask! but thats what im basically trying to do and need help with :)

thanks!

CornedBee
Jun 15th, 2003, 04:09 PM
I think there are PERL bindings for XML parser libraries.