Nick Wellnhofer 7e0bbbc143 parser: New input API
Provide a new set of functions to create xmlParserInputs. These can be
used for the document entity or from external entity loaders.

- Don't require xmlParserInputBuffer.
- All functions take a base URI.
- All functions take an encoding as string.
- xmlNewInputURL also takes a public ID.
- xmlNewInputMemory takes a size_t.
- Optimization hints for memory buffers.

Improve documentation.

Only call xmlInitParser before allocating a new parser context.

Call xmlCtxtUseOptions as early as possible.
2023-12-29 01:22:13 +01:00

33 lines
869 B
C

#ifndef XML_IO_H_PRIVATE__
#define XML_IO_H_PRIVATE__
#include <libxml/encoding.h>
#include <libxml/tree.h>
#include <libxml/xmlversion.h>
XML_HIDDEN void
xmlInitIOCallbacks(void);
XML_HIDDEN int
__xmlIOErr(int domain, int code, const char *extra);
XML_HIDDEN int
xmlNoNetExists(const char *filename);
XML_HIDDEN int
xmlParserInputBufferCreateFilenameSafe(const char *URI, xmlCharEncoding enc,
xmlParserInputBufferPtr *out);
XML_HIDDEN xmlParserInputBufferPtr
xmlNewInputBufferString(const char *str, int flags);
XML_HIDDEN xmlParserInputBufferPtr
xmlNewInputBufferMemory(const void *mem, size_t size, int flags,
xmlCharEncoding enc);
#ifdef LIBXML_OUTPUT_ENABLED
XML_HIDDEN xmlOutputBufferPtr
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
#endif
#endif /* XML_IO_H_PRIVATE__ */