Re: [xml] [HTMLparser] unwanted warnings



Le mer 07/01/2004 à 03:36, Malcolm Tredinnick a écrit :

hi,

Can you post a small code fragment showing how you are trying to parse
the document? In particular, it would be good to know what function you
are calling (with the precise parameters) to parse the document.

I basically use something like the following:

-----
htmlParserCtxtPtr ctxt = NULL;
htmlDocPtr doc = NULL;

ctxt = htmlCreateMemoryParserCtxt (buffer, strlen (buffer));
if (ctxt != NULL)
{
  htmlCtxtUseOptions (ctxt, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR);
  htmlParseDocument (ctxt);

  doc = ctxt->myDoc;
  if (doc != NULL && doc->children != NULL)
  {
    html_parser_parse (doc->children);
  }

  htmlFreeParserCtxt (ctxt);
}
-----

[...]

thanks,

bye





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]