MCPcopy Create free account
hub / github.com/buggins/coolreader / LVParseHTMLStream

Function LVParseHTMLStream

crengine/src/lvtinydom.cpp:7106–7136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7104}
7105
7106ldomDocument * LVParseHTMLStream( LVStreamRef stream,
7107 const elem_def_t * elem_table,
7108 const attr_def_t * attr_table,
7109 const ns_def_t * ns_table )
7110{
7111 if ( stream.isNull() )
7112 return NULL;
7113 bool error = true;
7114 ldomDocument * doc;
7115 doc = new ldomDocument();
7116 doc->setDocFlags( 0 );
7117
7118 ldomDocumentWriterFilter writerFilter(doc, false, HTML_AUTOCLOSE_TABLE);
7119 doc->setNodeTypes( elem_table );
7120 doc->setAttributeTypes( attr_table );
7121 doc->setNameSpaceTypes( ns_table );
7122
7123 /// FB2 format
7124 LVFileFormatParser * parser = new LVHTMLParser(stream, &writerFilter);
7125 if ( parser->CheckFormat() ) {
7126 if ( parser->Parse() ) {
7127 error = false;
7128 }
7129 }
7130 delete parser;
7131 if ( error ) {
7132 delete doc;
7133 doc = NULL;
7134 }
7135 return doc;
7136}
7137
7138#if 0
7139static lString16 escapeDocPath( lString16 path )

Callers 1

LVParseCHMHTMLStreamFunction · 0.85

Calls 7

setDocFlagsMethod · 0.80
setNodeTypesMethod · 0.80
setAttributeTypesMethod · 0.80
setNameSpaceTypesMethod · 0.80
isNullMethod · 0.45
CheckFormatMethod · 0.45
ParseMethod · 0.45

Tested by

no test coverage detected