#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <curl/curl.h>
#include <libxml/HTMLparser.h>
Go to the source code of this file.
Classes | |
struct | Context |
Defines | |
#define | COMPARE(a, b) (!strcasecmp((a), (b))) |
Functions | |
static void | cdata (void *voidContext, const xmlChar *chars, int length) |
static void | Characters (void *voidContext, const xmlChar *chars, int length) |
static void | EndElement (void *voidContext, const xmlChar *name) |
static void | handleCharacters (Context *context, const xmlChar *chars, int length) |
static bool | init (CURL *&conn, char *url) |
int | main (int argc, char *argv[]) |
static void | parseHtml (const std::string &html, std::string &title) |
static void | StartElement (void *voidContext, const xmlChar *name, const xmlChar **attributes) |
static int | writer (char *data, size_t size, size_t nmemb, std::string *writerData) |
Variables | |
static std::string | buffer |
static char | errorBuffer [CURL_ERROR_SIZE] |
static htmlSAXHandler | saxHandler |
#define COMPARE | ( | a, | |
b | |||
) | (!strcasecmp((a), (b))) |
Definition at line 47 of file htmltitle.cpp.
static void cdata | ( | void * | voidContext, |
const xmlChar * | chars, | ||
int | length | ||
) | [static] |
Definition at line 203 of file htmltitle.cpp.
static void Characters | ( | void * | voidContext, |
const xmlChar * | chars, | ||
int | length | ||
) | [static] |
Definition at line 190 of file htmltitle.cpp.
static void EndElement | ( | void * | voidContext, |
const xmlChar * | name | ||
) | [static] |
Definition at line 165 of file htmltitle.cpp.
static void handleCharacters | ( | Context * | context, |
const xmlChar * | chars, | ||
int | length | ||
) | [static] |
Definition at line 178 of file htmltitle.cpp.
Definition at line 87 of file htmltitle.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 268 of file htmltitle.cpp.
static void parseHtml | ( | const std::string & | html, |
std::string & | title | ||
) | [static] |
Definition at line 251 of file htmltitle.cpp.
static void StartElement | ( | void * | voidContext, |
const xmlChar * | name, | ||
const xmlChar ** | attributes | ||
) | [static] |
Definition at line 147 of file htmltitle.cpp.
static int writer | ( | char * | data, |
size_t | size, | ||
size_t | nmemb, | ||
std::string * | writerData | ||
) | [static] |
Definition at line 72 of file htmltitle.cpp.
std::string buffer [static] |
Definition at line 66 of file htmltitle.cpp.
char errorBuffer[CURL_ERROR_SIZE] [static] |
Definition at line 65 of file htmltitle.cpp.
htmlSAXHandler saxHandler [static] |
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, StartElement, EndElement, NULL, Characters, NULL, NULL, NULL, NULL, NULL, NULL, NULL, cdata, NULL }
Definition at line 216 of file htmltitle.cpp.