2 * wireshark's xml dissector .
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #ifndef __PACKET_XML_H__
25 #define __PACKET_XML_H__
27 #include "ws_symbol_export.h"
29 typedef struct _xml_ns_t
{
30 /* the name of this namespace */
33 /* its fully qualified name */
36 /* the contents of the whole element from <> to </> */
39 /* chunks of cdata from <> to </> excluding sub tags */
42 /* the subtree for its sub items */
45 GHashTable
* attributes
;
46 /* key: the attribute name
47 value: hf_id of what's between quotes */
49 /* the namespace's namespaces */
51 /* key: the element name
52 value: the child namespace */
54 GPtrArray
* element_names
;
55 /* imported directly from the parser and used while building the namespace */
59 #define XML_FRAME_ROOT 0
60 #define XML_FRAME_TAG 1
61 #define XML_FRAME_XMPLI 2
62 #define XML_FRAME_DTD_DOCTYPE 3
63 #define XML_FRAME_ATTRIB 4
64 #define XML_FRAME_CDATA 5
66 typedef struct _xml_frame_t
{
68 struct _xml_frame_t
* parent
;
69 struct _xml_frame_t
* first_child
;
70 struct _xml_frame_t
* last_child
;
71 struct _xml_frame_t
* prev_sibling
;
72 struct _xml_frame_t
* next_sibling
;
74 const gchar
*name_orig_case
;
78 proto_item
* last_item
;
84 xml_frame_t
*xml_get_tag(xml_frame_t
*frame
, const gchar
*name
);
86 xml_frame_t
*xml_get_attrib(xml_frame_t
*frame
, const gchar
*name
);
88 xml_frame_t
*xml_get_cdata(xml_frame_t
*frame
);
90 #endif /* __PACKET_XML_H__ */