• [^] # Re: Du XML ?

    Posté par . En réponse à la dépêche Projet Lumberjack. Évalué à 3.

    À vrai dire, je préfère encore du JSON/XML à ça:

     <34>1 2003年10月11日T22:14:15.003Z mymachine.example.com su - ID47
     - BOM'su root' failed for lonvick on /dev/pts/8
    In this example, the VERSION is 1 and the Facility has the value of
    4. The Severity is 2. The message was created on 11 October 2003 at
    10:14:15pm UTC, 3 milliseconds into the next second. The message
    originated from a host that identifies itself as
    "mymachine.example.com". The APP-NAME is "su" and the PROCID is
    unknown. The MSGID is "ID47". The MSG is "'su root' failed for
    lonvick...", encoded in UTF-8. The encoding is defined by the BOM.
    There is no STRUCTURED-DATA present in the message
    
    

    Et je parle même pas du "format structuré" et des combinaisons possibles entre les deux.

    Disons que je veuille récupérer des données du fichier de log (en général gros), je préfèrerais me faire un petit xsl ou xmlstarlet ou xpath plutôt que de faire une regexp sed qui marchera seulement 80% du temps.