* htmlReadDoc: * @cur: a pointer to a zero terminated string * @URL: the base URL to use for the document * @encoding: the document encoding, or NULL * @options: a combination of htmlParserOption(s) * * parse an XML in-memory document and build a tree. * * Returns the resulting document tree */
| 5989 | * Returns the resulting document tree |
| 5990 | */ |
| 5991 | htmlDocPtr |
| 5992 | htmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options) |
| 5993 | { |
| 5994 | htmlParserCtxtPtr ctxt; |
| 5995 | |
| 5996 | if (cur == NULL) |
| 5997 | return (NULL); |
| 5998 | |
| 5999 | xmlInitParser(); |
| 6000 | ctxt = htmlCreateDocParserCtxt(cur, NULL); |
| 6001 | if (ctxt == NULL) |
| 6002 | return (NULL); |
| 6003 | return (htmlDoRead(ctxt, URL, encoding, options, 0)); |
| 6004 | } |
| 6005 | |
| 6006 | /** |
| 6007 | * htmlReadFile: |