myhtml_status_t myhtml_parse_fragment_single(myhtml_tree_t* tree, myhtml_encoding_t encoding, const char* html, size_t html_size, myhtml_tag_id_t tag_id, enum myhtml_namespace my_namespace) { if(tree->flags & MyHTML_TREE_FLAGS_PARSE_END) { myhtml_tree_clean(tree); mythread_queue_clean(tree->queue); mythread_clean(tree->myhtml->thread); } if(tag_id == 0) tag_id = MyHTML_TAG_DIV; if(my_namespace == 0) my_namespace = MyHTML_NAMESPACE_HTML; tree->flags |= MyHTML_TREE_FLAGS_SINGLE_MODE; myhtml_tokenizer_fragment_init(tree, tag_id, my_namespace); myhtml_encoding_set(tree, encoding); myhtml_tokenizer_begin(tree, html, html_size); myhtml_tokenizer_end(tree); return MyHTML_STATUS_OK; }
myhtml_status_t myhtml_parse_chunk(myhtml_tree_t* tree, const char* html, size_t html_size) { if(tree->flags & MyHTML_TREE_FLAGS_PARSE_END) { myhtml_tree_clean(tree); mythread_queue_clean(tree->queue); mythread_clean(tree->myhtml->thread); } myhtml_tokenizer_chunk(tree, html, html_size); return MyHTML_STATUS_OK; }
myhtml_status_t myhtml_parse(myhtml_tree_t* tree, myhtml_encoding_t encoding, const char* html, size_t html_size) { if(tree->flags & MyHTML_TREE_FLAGS_PARSE_END) { myhtml_tree_clean(tree); mythread_queue_clean(tree->queue); mythread_clean(tree->myhtml->thread); } myhtml_encoding_set(tree, encoding); myhtml_tokenizer_begin(tree, html, html_size); myhtml_tokenizer_end(tree); return MyHTML_STATUS_OK; }
myhtml_status_t myhtml_parse_chunk_fragment(myhtml_tree_t* tree, const char* html, size_t html_size, myhtml_tag_id_t tag_id, enum myhtml_namespace my_namespace) { if(tree->flags & MyHTML_TREE_FLAGS_PARSE_END) { myhtml_tree_clean(tree); mythread_queue_clean(tree->queue); mythread_clean(tree->myhtml->thread); } if(tag_id == 0) tag_id = MyHTML_TAG_DIV; if(my_namespace == 0) my_namespace = MyHTML_NAMESPACE_HTML; myhtml_tokenizer_fragment_init(tree, tag_id, my_namespace); myhtml_tokenizer_chunk(tree, html, html_size); return MyHTML_STATUS_OK; }
void myhtml_clean(myhtml_t* myhtml) { mythread_clean(myhtml->thread); mcobject_async_node_all_clean(myhtml->async_incoming_buf); }
void myhtml_clean(myhtml_t* myhtml) { mythread_clean(myhtml->thread); }