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

Function xmlTextReaderConstLocalName

ThirdParty/libxml2/vtklibxml2/xmlreader.c:3147–3167  ·  view source on GitHub ↗

* xmlTextReaderConstLocalName: * @reader: the xmlTextReaderPtr used * * The local name of the node. * * Returns the local name or NULL if not available, the * string will be deallocated with the reader. */

Source from the content-addressed store, hash-verified

3145 * string will be deallocated with the reader.
3146 */
3147const xmlChar *
3148xmlTextReaderConstLocalName(xmlTextReaderPtr reader) {
3149 xmlNodePtr node;
3150 if ((reader == NULL) || (reader->node == NULL))
3151 return(NULL);
3152 if (reader->curnode != NULL)
3153 node = reader->curnode;
3154 else
3155 node = reader->node;
3156 if (node->type == XML_NAMESPACE_DECL) {
3157 xmlNsPtr ns = (xmlNsPtr) node;
3158 if (ns->prefix == NULL)
3159 return(constString(reader, BAD_CAST "xmlns"));
3160 else
3161 return(ns->prefix);
3162 }
3163 if ((node->type != XML_ELEMENT_NODE) &&
3164 (node->type != XML_ATTRIBUTE_NODE))
3165 return(xmlTextReaderConstName(reader));
3166 return(node->name);
3167}
3168
3169/**
3170 * xmlTextReaderName:

Callers 2

processNodeFunction · 0.85
patternNodeFunction · 0.85

Calls 2

constStringFunction · 0.85
xmlTextReaderConstNameFunction · 0.85

Tested by 1

patternNodeFunction · 0.68