Ethereal-dev: Re: [Ethereal-dev] http xml dissector plugin

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

From: "Adam Doppelt" <amd@xxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2003 16:39:40 -0700
Thanks for the quick reply.

> 1) the configuration script should check whether the g_markup routines
> are available, and not build the plugin if they're not (so that
> Ethereal will continue to build with GLib 1.2[.x]; was gmarkup present
> in 2.0[.x]?);

I'm not familiar with configure scripts and I'm building on win32. Any
pointers? I think gmarkup was added in glib 1.3.2 (see
http://mail.gnome.org/archives/gtk-devel-list/2000-November/msg00147.html).
Perhaps we can just check for >= the current version?

> 2) note that it says "The "GMarkup" parser is intended to parse a
> simple markup format that's a subset of XML. This is a small,
> efficient, easy-to-use parser. It should not be used if you expect to
> interoperate with other applications generating full-scale XML." - does
> that mean that if the body contains features *NOT* supported by gmarkup
> (the page in question lists them), it won't be properly parsed?

XML that isn't supported will fail to parse but won't crash. I think the
gmarkup parse is broad enough to be useful. It works perfectly for my needs
(SOAP, UPnP, etc.).

> Also, when does that dissector get called?  I.e., who determines that
> the body is XML?

I wrote it as a heuristic dissector within the "http" subdissector list. The
dissector checks for "<xml" at the start of the body and returns FALSE if it
doesn't match. Is there a better approach?

Adam