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

Function xmlXIncludeGetProp

ThirdParty/libxml2/vtklibxml2/xinclude.c:195–215  ·  view source on GitHub ↗

* xmlXIncludeGetProp: * @ctxt: the XInclude context * @cur: the node * @name: the attribute name * * Get an XInclude attribute * * Returns the value (to be freed) or NULL if not found */

Source from the content-addressed store, hash-verified

193 * Returns the value (to be freed) or NULL if not found
194 */
195static xmlChar *
196xmlXIncludeGetProp(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur,
197 const xmlChar *name) {
198 xmlChar *ret;
199
200 if (xmlNodeGetAttrValue(cur, name, XINCLUDE_NS, &ret) < 0)
201 xmlXIncludeErrMemory(ctxt);
202 if (ret != NULL)
203 return(ret);
204
205 if (ctxt->legacy != 0) {
206 if (xmlNodeGetAttrValue(cur, name, XINCLUDE_OLD_NS, &ret) < 0)
207 xmlXIncludeErrMemory(ctxt);
208 if (ret != NULL)
209 return(ret);
210 }
211
212 if (xmlNodeGetAttrValue(cur, name, NULL, &ret) < 0)
213 xmlXIncludeErrMemory(ctxt);
214 return(ret);
215}
216/**
217 * xmlXIncludeFreeRef:
218 * @ref: the XInclude reference

Callers 2

xmlXIncludeAddNodeFunction · 0.85
xmlXIncludeLoadTxtFunction · 0.85

Calls 2

xmlNodeGetAttrValueFunction · 0.85
xmlXIncludeErrMemoryFunction · 0.85

Tested by

no test coverage detected