Hey guys, I’ve been lurking around this forum for a while. Found loads of useful stuff but I am now stuck.
I have a program that will output a text file when I receive a message. The text file contains User ID, Date and Message. I want to write a script (maybe with some automator) that will update an XML file (with predefined tags for the user id, date and time).
Is this even possible or am I wasting my time?
Model: BlackBook 2ghz C2D 2gb RAM
AppleScript: 2.1.1
Browser: Firefox 3.0
Operating System: Mac OS X (10.4)
If the text file contains this information in a structured way, e.g. tab-delimited or one key/value-pair per line, you can read and parse the text file and extract the data with AppleScript.
Do you want to write the retrieved data to an existing XML file or do you just want to create a new XML file with this data? In the first case you might consider using XML Tools. But if you just want to create a new XML file, than you could write a very simple script that just replaces tags found in an XML template with the data retrieved from the original text file.
Greetings from hot and sunny Germany!
It would be in an exsisting XML file. I’m taking a look at XML tools now.