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

Function xmlTextReaderConstNamespaceUri

ThirdParty/libxml2/vtklibxml2/xmlreader.c:3408–3425  ·  view source on GitHub ↗

* xmlTextReaderConstNamespaceUri: * @reader: the xmlTextReaderPtr used * * The URI defining the namespace associated with the node. * * Returns the namespace URI or NULL if not available, the string * will be deallocated with the reader */

Source from the content-addressed store, hash-verified

3406 * will be deallocated with the reader
3407 */
3408const xmlChar *
3409xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader) {
3410 xmlNodePtr node;
3411 if ((reader == NULL) || (reader->node == NULL))
3412 return(NULL);
3413 if (reader->curnode != NULL)
3414 node = reader->curnode;
3415 else
3416 node = reader->node;
3417 if (node->type == XML_NAMESPACE_DECL)
3418 return(constString(reader, BAD_CAST "http://www.w3.org/2000/xmlns/"));
3419 if ((node->type != XML_ELEMENT_NODE) &&
3420 (node->type != XML_ATTRIBUTE_NODE))
3421 return(NULL);
3422 if (node->ns != NULL)
3423 return(constString(reader, node->ns->href));
3424 return(NULL);
3425}
3426
3427/**
3428 * xmlTextReaderBaseUri:

Callers 2

processNodeFunction · 0.85
patternNodeFunction · 0.85

Calls 1

constStringFunction · 0.85

Tested by 1

patternNodeFunction · 0.68