[hobbit] XML Parsing

Jason Chambers Jason.Chambers at geosoft.com
Wed Dec 2 16:20:06 CET 2009


I want to parse the Ironport xml status file and make it useful... kinda looks like this:

<status build="phoebe 6.5.3-007" hostname="mail.somemailserver.com" timestamp="20091202095834">
  <birth_time timestamp="20091010092305 (53d 1h 35m 29s)"/>
  <last_counter_reset timestamp="20080408102414"/>
  <system status="online" />
  <oldest_message secs="191115" mid="2033351" />
  <features>
    <feature name="IronPort Anti-Spam" time_remaining="75474158" />
    <feature name="Sophos" time_remaining="75430958" />
    <feature name="McAfee" time_remaining="-50177672" />
  </features>
  <counters>
    <counter name="inj_msgs"
        reset="1672658"
        uptime="135602"
        lifetime="1672668" />
    <counter name="inj_recips"
        reset="1879254"
        uptime="147263"
        lifetime="1879264" />
    <counter name="gen_bounce_recips"
        reset="52001"
        uptime="3664"
        lifetime="52006" />
    <counter name="rejected_recips"
        reset="391394"
        uptime="16835"
        lifetime="391394" />
    <counter name="dropped_msgs"
        reset="476453"
        uptime="16952"
        lifetime="476453" />
    <counter name="soft_bounced_evts"
        reset="42976"
        uptime="7217"
        lifetime="42976" />
    <counter name="completed_recips"

Etc...

Jason Chambers
IT Help Desk Associate

GEOSOFT INC.
freedom to explore
T +1 416.369.0111 #344
F +1 416.369.9599

Visit our site at www.geosoft.com

From: Jerald Sheets [mailto:questy at gmail.com]
Sent: December-02-09 10:08 AM
To: hobbit at hswn.dk
Subject: Re: [hobbit] XML Parsing

For what purposes and in what way?

Are you wanting to use it as a config element?  Are you wanting to search through it for a pattern match?

With the open-ended scripting you can do in Hobbit, the *what* you are asking is a non-issue.  The *how* based on the *why* is the important part.



---
Jerald M. Sheets jr.

On Wed, Dec 2, 2009 at 9:41 AM, Jason Chambers <Jason.Chambers at geosoft.com<mailto:Jason.Chambers at geosoft.com>> wrote:
Does anyone know how I can go about parsing data out of an XML txt file and then including it into hobbit? That would be extremely cool if there is an easy way to do that.

Jason Chambers
IT Help Desk Associate

GEOSOFT INC.
freedom to explore
T +1 416.369.0111 #344
F +1 416.369.9599

Visit our site at www.geosoft.com<http://www.geosoft.com>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20091202/1cafdb18/attachment.html>


More information about the Xymon mailing list