[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Appending XML to File
Hi Alan, > I was wondering if anyone had used XML in a logging context. To answer the question, I believe that you will find a good way to manage the data is to store it into a SQL database in a memo field, along with a datetime entry stamp and a unique row id. This will take care of: - concurrency issues, if you need it to work from multiple machines. - programming time, design/code/debugging of what is a deceptively simple task (aka all I want is a simple system that just...) - performance. A free db like mysql might be good for a small budget. Consider other products if you have more to spend. - maintenance and querying. Very easy with sql and you get a good choice of languages. > Have you wanted to append XML to file, or store XML events to > file? How did you do this and manage to keep the document well > formed? I don't know how fast you need the logging to be, your spec didn't say. What we do to keep it really fast is make sure it can go in a single TCP/IP packet... and use our whacky compact and fast xml encoding. ie EventType&="LogMessage" MachineName&="HP-EPC" LogMessage&="Processing complete" or go the normal way with something like this: <LogEntry> <EventType>LogMessage</EventType> <MachineName>HP-EPC</MachineName> <LogMessage>Processing complete</LogMessage> </LogEntry> Then you save that into the database. Best Regards David ----------------------------------------------------------------
|
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
|