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

Function xmlTreeEnsureXMLDecl

ThirdParty/libxml2/vtklibxml2/tree.c:6019–6032  ·  view source on GitHub ↗

* xmlTreeEnsureXMLDecl: * @doc: the doc * * Ensures that there is an XML namespace declaration on the doc. * * Returns the XML ns-struct or NULL if a memory allocation failed. */

Source from the content-addressed store, hash-verified

6017* Returns the XML ns-struct or NULL if a memory allocation failed.
6018*/
6019static xmlNsPtr
6020xmlTreeEnsureXMLDecl(xmlDocPtr doc)
6021{
6022 xmlNsPtr ns;
6023
6024 ns = doc->oldNs;
6025 if (ns != NULL)
6026 return (ns);
6027
6028 ns = xmlNewXmlNs();
6029 doc->oldNs = ns;
6030
6031 return(ns);
6032}
6033
6034/**
6035 * xmlSearchNsSafe:

Callers 7

xmlSearchNsSafeFunction · 0.85
xmlSearchNsByHrefSafeFunction · 0.85
xmlDOMWrapStoreNsFunction · 0.85
xmlDOMWrapAdoptAttrFunction · 0.85

Calls 1

xmlNewXmlNsFunction · 0.85

Tested by

no test coverage detected