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

Function xmlTextReaderConstEncoding

ThirdParty/libxml2/vtklibxml2/xmlreader.c:2942–2955  ·  view source on GitHub ↗

* xmlTextReaderConstEncoding: * @reader: the xmlTextReaderPtr used * * Determine the encoding of the document being read. * * Returns a string containing the encoding of the document or NULL in * case of error. The string is deallocated with the reader. */

Source from the content-addressed store, hash-verified

2940 * case of error. The string is deallocated with the reader.
2941 */
2942const xmlChar *
2943xmlTextReaderConstEncoding(xmlTextReaderPtr reader) {
2944 const xmlChar *encoding = NULL;
2945
2946 if (reader == NULL)
2947 return(NULL);
2948
2949 if (reader->ctxt != NULL)
2950 encoding = xmlGetActualEncoding(reader->ctxt);
2951 else if (reader->doc != NULL)
2952 encoding = reader->doc->encoding;
2953
2954 return(constString(reader, encoding));
2955}
2956
2957
2958/************************************************************************

Callers

nothing calls this directly

Calls 2

xmlGetActualEncodingFunction · 0.85
constStringFunction · 0.85

Tested by

no test coverage detected