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

Function xmlReaderNewDoc

ThirdParty/libxml2/vtklibxml2/xmlreader.c:5357–5372  ·  view source on GitHub ↗

* xmlReaderNewDoc: * @reader: an XML reader * @cur: a pointer to a zero terminated string * @URL: the base URL to use for the document * @encoding: the document encoding, or NULL * @options: a combination of xmlParserOption * * Setup an xmltextReader to parse an XML in-memory document. * The parsing flags @options are a combination of xmlParserOption. * This reuses the existing @read

Source from the content-addressed store, hash-verified

5355 * Returns 0 in case of success and -1 in case of error
5356 */
5357int
5358xmlReaderNewDoc(xmlTextReaderPtr reader, const xmlChar * cur,
5359 const char *URL, const char *encoding, int options)
5360{
5361
5362 int len;
5363
5364 if (cur == NULL)
5365 return (-1);
5366 if (reader == NULL)
5367 return (-1);
5368
5369 len = xmlStrlen(cur);
5370 return (xmlReaderNewMemory(reader, (const char *)cur, len,
5371 URL, encoding, options));
5372}
5373
5374/**
5375 * xmlReaderNewFile:

Callers

nothing calls this directly

Calls 2

xmlStrlenFunction · 0.85
xmlReaderNewMemoryFunction · 0.85

Tested by

no test coverage detected