Re: [logs] Converting log messages to XML format.

From: Matt Zimmerman (mdzat_private)
Date: Sat Nov 10 2001 - 10:10:33 PST

  • Next message: BrandonButterworth: "Re: [logs] Converting log messages to XML format."

    On Fri, Nov 09, 2001 at 02:29:01PM -0800, Cedar Hannan wrote:
    
    > The only problem I have run into is that sometimes the text of a message
    > will contain characters that mess up the XML "code".  This happens when
    > the message text contains "<some_string>".  It then gets interpreted as a
    > tag and breaks things.  The only thing I can think of to do is write a
    > Perl script that "scrubs" the file to pull out any extraneous "<".  I was
    > hoping to avoid this.  I am very, very new to XML so please excuse me if
    > I'm confusing things.  Any ideas?
    
    Try the XML::Writer Perl module.  From the Debian package description:
    
    Description: Perl module for writing XML documents
     XML::Writer is a helper module for Perl programs that write an XML
     document.  The module handles all escaping for attribute values and
                           ^^^^^^^^^^^^^^^^^^^^
     character data and constructs different types of markup, such as
     tags, comments, and processing instructions.
     .
     By default, the module performs several well-formedness checks to
     catch errors during output.  This behaviour can be extremely useful
     during development and debugging, but it can be turned off for
     production-grade code.
     .
     The module can operate either in regular mode in or Namespace
     processing mode.  In Namespace mode, the module will generate
     Namespace Declarations itself, and will perform additional checks on
     the output.
     .
     Additional support is available for a simplified data mode with no
     mixed content: newlines are automatically inserted around elements
     and elements can optionally be indented based as their nesting
     level.
    
    -- 
     - mdz
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: loganalysis-unsubscribeat_private
    For additional commands, e-mail: loganalysis-helpat_private
    



    This archive was generated by hypermail 2b30 : Sat Nov 10 2001 - 14:03:21 PST