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

Function xmlReaderNewFile

ThirdParty/libxml2/vtklibxml2/xmlreader.c:5387–5404  ·  view source on GitHub ↗

* xmlReaderNewFile: * @reader: an XML reader * @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. * This reuses the existing @reader xmlTextReader. * * Returns 0 in case of success and -1 in case of

Source from the content-addressed store, hash-verified

5385 * Returns 0 in case of success and -1 in case of error
5386 */
5387int
5388xmlReaderNewFile(xmlTextReaderPtr reader, const char *filename,
5389 const char *encoding, int options)
5390{
5391 xmlParserInputBufferPtr input;
5392
5393 if (filename == NULL)
5394 return (-1);
5395 if (reader == NULL)
5396 return (-1);
5397
5398 input =
5399 xmlParserInputBufferCreateFilename(filename,
5400 XML_CHAR_ENCODING_NONE);
5401 if (input == NULL)
5402 return (-1);
5403 return (xmlTextReaderSetup(reader, input, filename, encoding, options));
5404}
5405
5406/**
5407 * xmlReaderNewMemory:

Callers

nothing calls this directly

Calls 2

xmlTextReaderSetupFunction · 0.85

Tested by

no test coverage detected