#include <stddef.h>
#include <inttypes.h>
#include <dom/dom.h>
#include "xmlerror.h"
Go to the source code of this file.
◆ dom_xml_parser
◆ dom_xml_parser_completed()
Notify parser that datastream is empty
- Parameters
-
| parser | The XML parser instance to notify |
- Returns
- DOM_XML_OK on success, DOM_XML_EXTERNAL_ERR | expat error on failure
This will force any remaining data through the parser
Notify parser that datastream is empty
- Parameters
-
| parser | The XML parser instance to notify |
- Returns
- DOM_XML_OK on success, DOM_XML_EXTERNAL_ERR | libxml error on failure
This will force any remaining data through the parser
◆ dom_xml_parser_create()
Create an XML parser instance
- Parameters
-
| enc | Source charset, or NULL |
| int_enc | Desired charset of document buffer (UTF-8 or UTF-16) |
| msg | Informational message function |
| mctx | Pointer to client-specific private data |
| document | DOM Document |
- Returns
- Pointer to instance, or NULL on memory exhaustion
int_enc is ignored due to it being made of bees.
Create an XML parser instance
- Parameters
-
| enc | Source charset, or NULL |
| int_enc | Desired charset of document buffer (UTF-8 or UTF-16) |
| msg | Informational message function |
| mctx | Pointer to client-specific private data |
- Returns
- Pointer to instance, or NULL on memory exhaustion
Neither enc nor int_enc are used here. libxml only supports a UTF-8 document buffer and forcibly setting the parser encoding is not yet implemented
◆ dom_xml_parser_destroy()
Destroy an XML parser instance
- Parameters
-
| parser | The parser instance to destroy |
◆ dom_xml_parser_parse_chunk()
Parse a chunk of data
- Parameters
-
| parser | The XML parser instance to use for parsing |
| data | Pointer to data chunk |
| len | Byte length of data chunk |
- Returns
- DOM_XML_OK on success, DOM_XML_EXTERNAL_ERR | expat error on failure
Parse a chunk of data
- Parameters
-
| parser | The XML parser instance to use for parsing |
| data | Pointer to data chunk |
| len | Byte length of data chunk |
- Returns
- DOM_XML_OK on success, DOM_XML_EXTERNAL_ERR | libxml error on failure