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

Function xmlParserNsLookupSax

ThirdParty/libxml2/vtklibxml2/parser.c:1612–1630  ·  view source on GitHub ↗

* xmlParserNsLookupSax: * @ctxt: parser context * @prefix: namespace prefix * * Lookup extra data for the given prefix. This returns data stored * with xmlParserNsUdpateSax. * * Returns the data on success, NULL if no namespace was found. */

Source from the content-addressed store, hash-verified

1610 * Returns the data on success, NULL if no namespace was found.
1611 */
1612void *
1613xmlParserNsLookupSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix) {
1614 xmlHashedString hprefix;
1615 int nsIndex;
1616
1617 if (prefix == ctxt->str_xml)
1618 return(NULL);
1619
1620 hprefix.name = prefix;
1621 if (prefix != NULL)
1622 hprefix.hashValue = xmlDictComputeHash(ctxt->dict, prefix);
1623 else
1624 hprefix.hashValue = 0;
1625 nsIndex = xmlParserNsLookup(ctxt, &hprefix, NULL);
1626 if ((nsIndex == INT_MAX) || (nsIndex < ctxt->nsdb->minNsIndex))
1627 return(NULL);
1628
1629 return(ctxt->nsdb->extra[nsIndex].saxData);
1630}
1631
1632/**
1633 * xmlParserNsUpdateSax:

Callers 2

xmlSAX2AttributeNsFunction · 0.85
xmlSAX2StartElementNsFunction · 0.85

Calls 2

xmlDictComputeHashFunction · 0.85
xmlParserNsLookupFunction · 0.85

Tested by

no test coverage detected