[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Appending XML to File


appending xml
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.