ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: RE: [Ethereal-dev] RFC: Print as XML

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Fulvio Risso" <fulvio.risso@xxxxxxxxx>
Date: Tue, 23 Sep 2003 09:09:34 +0200
HI.
You may take a look at Analyzer 3.0 alpha
(http://analzyer.polito.it/30alpha/).
If you open a capture and you save as HTML, it will create a set of files,
which include the XML dump of the capture (the ".pdm" file).
If you are interested in that, I can give you more details. It could be an
excellent idea if we can be able to share the same format between Analyzer
and Ethereal.

	fulvio

> -----Original Message-----
> From: ethereal-dev-bounces@xxxxxxxxxxxx
> [mailto:ethereal-dev-bounces@xxxxxxxxxxxx]On Behalf Of John McDermott
> Sent: lunedi 22 settembre 2003 18.17
> To: Gilbert Ramirez
> Cc: Ethereal Development
> Subject: Re: [Ethereal-dev] RFC: Print as XML
>
>
>
>
> Gilbert Ramirez wrote:
> > I'm adding the ability to [t]ethereal to print a capture file as XML. I
> > need this so I can write a Python program to reconstruct data from a
> > capture file and produce a nice report. Someday we'll embed Python in
> > Ethereal, but until then, this feature should help me and others wishing
> > to do similar things.
> >
> > I'm not an XML expert. I see two styles of printing as XML. Either by
> > making the field names and values attributes of "node" elements:
>
> Here is a third option with perl code to access it. Hopefully we'll embed
> perl in Ethereal or at least make it an option :-).
>
> The XML is after the __DATA__.  Note the simplification compared to
> Gilbert's second option.
>
> use strict;
> use XML::Simple;
> use Data::Dumper;
> use IO::Handle;
>
> my $io = new IO::Handle;
> my $packet = XMLin($io->fdopen(fileno(DATA),"r"));
> print Dumper($packet);
>
> __DATA__
> <ethereal-packets>
>    <frame>
>      <marked>0</marked>
>      <time>Sep 17, 2003 10:12:45.069203000</time>
>      <time_delta>0.035904000</time_delta>
>      <time_relative>38.980675000</time_relative>
>      <number>253</number>
>      <pkt_len>1514</pkt_len>
>      <cap_len>1514</cap_len>
>      <file_off>70170</file_off>
>    </frame>
> </ethereal-packets>
>
> --john
>
> --
> John McDermott
> Writer, Educator, Consultant
> jjm@xxxxxxxxxx		http://www.jkintl.com
> V +1 505/377-6293 F +1 505/377-6313
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev