diff options
-rw-r--r-- | dtds/presence.dtd | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-xml.c | 13 |
2 files changed, 11 insertions, 5 deletions
diff --git a/dtds/presence.dtd b/dtds/presence.dtd index 49c4543451..4e5c42b662 100644 --- a/dtds/presence.dtd +++ b/dtds/presence.dtd @@ -1,9 +1,10 @@ <? wireshark:protocol proto_name="presence" description="presence XML doc (RFC 3863)" + media="application/cpim-pidf+xml" hierarchy="yes" ?> <!-- -$Id:$ +$Id$ --> diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c index fceb4be553..6d9a14a052 100644 --- a/epan/dissectors/packet-xml.c +++ b/epan/dissectors/packet-xml.c @@ -182,10 +182,8 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvbparse_elem_t* tok = NULL; static GPtrArray* stack = NULL; xml_frame_t* current_frame; - - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_append_str(pinfo->cinfo, COL_PROTOCOL, "/XML"); - + char* colinfo_str; + if(!tree) return; if (stack != NULL) @@ -205,8 +203,15 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (! root_ns ) { root_ns = &xml_ns; + colinfo_str = "/XML"; + } else { + colinfo_str = ep_strdup_printf("/%s",root_ns->name); + g_strup(colinfo_str); } + if (check_col(pinfo->cinfo, COL_PROTOCOL)) + col_append_str(pinfo->cinfo, COL_PROTOCOL, colinfo_str); + current_frame->ns = root_ns; current_frame->item = proto_tree_add_item(tree,current_frame->ns->hf_tag,tvb,0,-1,FALSE); |