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

Function xmlNewEntityInputStream

ThirdParty/libxml2/vtklibxml2/parserInternals.c:1863–1886  ·  view source on GitHub ↗

* xmlNewEntityInputStream: * @ctxt: an XML parser context * @ent: an Entity pointer * * DEPRECATED: Internal function, do not use. * * Create a new input stream based on an xmlEntityPtr * * Returns the new input stream or NULL */

Source from the content-addressed store, hash-verified

1861 * Returns the new input stream or NULL
1862 */
1863xmlParserInputPtr
1864xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr ent) {
1865 xmlParserInputPtr input;
1866
1867 if ((ctxt == NULL) || (ent == NULL))
1868 return(NULL);
1869
1870 if (ent->content != NULL) {
1871 input = xmlNewInputString(ctxt, NULL, (const char *) ent->content,
1872 NULL, XML_INPUT_BUF_STATIC);
1873 } else if (ent->URI != NULL) {
1874 input = xmlLoadExternalEntity((char *) ent->URI,
1875 (char *) ent->ExternalID, ctxt);
1876 } else {
1877 return(NULL);
1878 }
1879
1880 if (input == NULL)
1881 return(NULL);
1882
1883 input->entity = ent;
1884
1885 return(input);
1886}
1887
1888/**
1889 * xmlNewStringInputStream:

Callers 2

xmlParsePEReferenceFunction · 0.85
xmlCtxtParseEntityFunction · 0.85

Calls 2

xmlNewInputStringFunction · 0.85
xmlLoadExternalEntityFunction · 0.85

Tested by

no test coverage detected