コード例 #1
0
/* sax handler called when an xml end tag is found
 * used to parse the stream, head and clip nodes
 */
static void
gst_cmml_parser_parse_end_element_ns (xmlParserCtxt * ctxt,
    const xmlChar * name, const xmlChar * prefix, const xmlChar * URI)
{
  xmlNodePtr node;
  GstCmmlParser *parser = (GstCmmlParser *) ctxt->_private;

  xmlSAX2EndElementNs (ctxt, name, prefix, URI);

  if (!xmlStrcmp (name, (xmlChar *) "clip")) {
    if (parser->clip_callback) {
      node = gst_cmml_parser_get_last_element (parser);
      gst_cmml_parser_parse_clip (parser, node);
    }
  } else if (!xmlStrcmp (name, (xmlChar *) "cmml")) {
    if (parser->cmml_end_callback)
      parser->cmml_end_callback (parser->user_data);
  } else if (!xmlStrcmp (name, (xmlChar *) "stream")) {
    if (parser->stream_callback) {
      node = gst_cmml_parser_get_last_element (parser);
      gst_cmml_parser_parse_stream (parser, node);
    }
  } else if (!xmlStrcmp (name, (xmlChar *) "head")) {
    if (parser->head_callback) {
      node = gst_cmml_parser_get_last_element (parser);
      gst_cmml_parser_parse_head (parser, node);
    }
  }
}
コード例 #2
0
ファイル: e-soap-message.c プロジェクト: tivv/evolution-ews
static void
soap_sax_endElementNs (gpointer _ctxt,
                       const xmlChar *localname,
                       const xmlChar *prefix,
                       const xmlChar *uri)
{
	xmlParserCtxt *ctxt = _ctxt;
	ESoapMessagePrivate *priv = ctxt->_private;

	if (priv->steal_fd != -1) {
#ifdef G_OS_WIN32
		closesocket (priv->steal_fd);
#else
		close (priv->steal_fd);
#endif
		priv->steal_fd = -1;
	}
	xmlSAX2EndElementNs (ctxt, localname, prefix, uri);
}