MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlTreeNSListLookupByPrefix

Function xmlTreeNSListLookupByPrefix

ThirdParty/libxml2/vtklibxml2/tree.c:8044–8061  ·  view source on GitHub ↗

* xmlTreeLookupNsListByPrefix: * @nsList: a list of ns-structs * @prefix: the searched prefix * * Searches for a ns-decl with the given prefix in @nsList. * * Returns the ns-decl if found, NULL if not found and on * API errors. */

Source from the content-addressed store, hash-verified

8042* API errors.
8043*/
8044static xmlNsPtr
8045xmlTreeNSListLookupByPrefix(xmlNsPtr nsList, const xmlChar *prefix)
8046{
8047 if (nsList == NULL)
8048 return (NULL);
8049 {
8050 xmlNsPtr ns;
8051 ns = nsList;
8052 do {
8053 if ((prefix == ns->prefix) ||
8054 xmlStrEqual(prefix, ns->prefix)) {
8055 return (ns);
8056 }
8057 ns = ns->next;
8058 } while (ns != NULL);
8059 }
8060 return (NULL);
8061}
8062
8063/*
8064*

Callers 1

Calls 1

xmlStrEqualFunction · 0.85

Tested by

no test coverage detected