#include <libxml/tree.h>
#include <libxml/parser.h>
-#define ATOM_NAMESPACE "http://www.w3.org/2005/Atom"
-
struct _atom_entry
{
xmlDocPtr doc;
xmlNodePtr root;
xmlNodePtr child;
entry = g_slice_new0 (AtomEntry);
- entry->doc = xmlReadMemory (data, len, NULL, NULL, XML_PARSE_RECOVER);
+ entry->doc = xmlReadMemory (data, len, NULL, NULL,
+ XML_PARSE_RECOVER | XML_PARSE_NOERROR);
if (entry->doc == NULL ||
(root = xmlDocGetRootElement (entry->doc)) == NULL)
{
atom_entry_to_xmlnode (AtomEntry *entry)
{
if (entry->doc)
- return xmlDocGetRootElement (entry->doc);
+ return xmlCopyNodeList (xmlDocGetRootElement (entry->doc));
return NULL;
}