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

Function xmlReaderForFile

ThirdParty/libxml2/vtklibxml2/xmlreader.c:5162–5175  ·  view source on GitHub ↗

* xmlReaderForFile: * @filename: a file or URL * @encoding: the document encoding, or NULL * @options: a combination of xmlParserOption * * parse an XML file from the filesystem or the network. * The parsing flags @options are a combination of xmlParserOption. * * Returns the new reader or NULL in case of error. */

Source from the content-addressed store, hash-verified

5160 * Returns the new reader or NULL in case of error.
5161 */
5162xmlTextReaderPtr
5163xmlReaderForFile(const char *filename, const char *encoding, int options)
5164{
5165 xmlTextReaderPtr reader;
5166
5167 reader = xmlNewTextReaderFilename(filename);
5168 if (reader == NULL)
5169 return (NULL);
5170 if (xmlTextReaderSetup(reader, NULL, NULL, encoding, options) < 0) {
5171 xmlFreeTextReader(reader);
5172 return (NULL);
5173 }
5174 return (reader);
5175}
5176
5177/**
5178 * xmlReaderForMemory:

Callers 3

streamFileFunction · 0.85
streamParseTestFunction · 0.85
rngStreamTestFunction · 0.85

Calls 3

xmlNewTextReaderFilenameFunction · 0.85
xmlTextReaderSetupFunction · 0.85
xmlFreeTextReaderFunction · 0.85

Tested by 2

streamParseTestFunction · 0.68
rngStreamTestFunction · 0.68