refactor: put HTTP and XML logic into reusable modules

This commit is contained in:
frosty
2026-03-12 18:05:09 -04:00
parent c802a4784a
commit 0d65dcd24c
8 changed files with 366 additions and 356 deletions

14
src/Utility/XmlHelper.h Normal file
View File

@@ -0,0 +1,14 @@
#ifndef XMLHELPER_H
#define XMLHELPER_H
#include "../Scraping/Scraping.h"
#include <libxml/xpath.h>
SearchResult *xml_result_alloc(int count, int max_results);
void xml_result_free(SearchResult *results, int count);
xmlXPathObjectPtr xml_xpath_eval(xmlXPathContextPtr ctx, const char *xpath);
char *xml_node_content(xmlNodePtr node);
char *xpath_text(xmlDocPtr doc, const char *xpath);
#endif