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

Function xmlGetDtdElementDesc

ThirdParty/libxml2/vtklibxml2/valid.c:2952–2974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2950 */
2951
2952xmlElementPtr
2953xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) {
2954 xmlElementTablePtr table;
2955 xmlElementPtr cur;
2956 const xmlChar *localname;
2957 xmlChar *prefix;
2958
2959 if ((dtd == NULL) || (dtd->elements == NULL) ||
2960 (name == NULL))
2961 return(NULL);
2962
2963 table = (xmlElementTablePtr) dtd->elements;
2964 if (table == NULL)
2965 return(NULL);
2966
2967 localname = xmlSplitQName4(name, &prefix);
2968 if (localname == NULL)
2969 return(NULL);
2970 cur = xmlHashLookup2(table, localname, prefix);
2971 if (prefix != NULL)
2972 xmlFree(prefix);
2973 return(cur);
2974}
2975
2976/**
2977 * xmlGetDtdElementDesc2:

Callers 2

xmlIsMixedElementFunction · 0.85
xmlValidGetValidElementsFunction · 0.85

Calls 2

xmlSplitQName4Function · 0.85
xmlHashLookup2Function · 0.85

Tested by

no test coverage detected