Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of libdom.
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
  6.  */
  7.  
  8. #ifndef xml_xmlparser_h_
  9. #define xml_xmlparser_h_
  10.  
  11. #include <stddef.h>
  12. #include <inttypes.h>
  13.  
  14. #include <dom/dom.h>
  15.  
  16. #include "xmlerror.h"
  17.  
  18. typedef struct dom_xml_parser dom_xml_parser;
  19.  
  20. /* Create an XML parser instance */
  21. dom_xml_parser *dom_xml_parser_create(const char *enc, const char *int_enc,
  22.                 dom_msg msg, void *mctx, dom_document **document);
  23.  
  24. /* Destroy an XML parser instance */
  25. void dom_xml_parser_destroy(dom_xml_parser *parser);
  26.  
  27. /* Parse a chunk of data */
  28. dom_xml_error dom_xml_parser_parse_chunk(dom_xml_parser *parser,
  29.                 uint8_t *data, size_t len);
  30.  
  31. /* Notify parser that datastream is empty */
  32. dom_xml_error dom_xml_parser_completed(dom_xml_parser *parser);
  33.  
  34. #endif
  35.