MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / xml_get_all_paths

Function xml_get_all_paths

gtk/src/chapters.c:329–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329static xmlXPathObjectPtr
330xml_get_all_paths (xmlDocPtr doc, xmlNodePtr node, const char *path)
331{
332 xmlXPathContextPtr context;
333 xmlXPathObjectPtr result;
334
335 context = xmlXPathNewContext(doc);
336 if (node)
337 xmlXPathSetContextNode(node, context);
338
339 result = xmlXPathEvalExpression((const xmlChar *) path, context);
340 xmlXPathFreeContext(context);
341 if (result == NULL)
342 {
343 g_debug("xml: Error in xmlXPathEvalExpression");
344 return NULL;
345 }
346 if(xmlXPathNodeSetIsEmpty(result->nodesetval))
347 {
348 g_debug("xml: Node set is empty");
349 xmlXPathFreeObject(result);
350 return NULL;
351 }
352 return result;
353}
354
355static gboolean
356chapter_list_import_xml (const gchar *file, signal_user_data_t *ud)

Callers 1

chapter_list_import_xmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected