mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
add pugixml
Origin commit data
------------------
Commit: 422c91d117
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-04-27 (Mon, 27 Apr 2015)
This commit is contained in:
11
configure.ac
11
configure.ac
@@ -135,6 +135,17 @@ if test "$enable_giflib" = "yes"; then
|
||||
AC_DEFINE(ENABLE_GIFLIB,1,[use giflib instead of libungif])
|
||||
fi
|
||||
|
||||
### USE_PUGIXML
|
||||
AC_ARG_ENABLE(pugixml,
|
||||
AS_HELP_STRING(--enable-pugixml,use pugixml instead of xmltree),
|
||||
,[enable_pugixml=no])
|
||||
|
||||
AM_CONDITIONAL(USE_PUGIXML,test "$enable_pugixml" = "yes")
|
||||
if test "$enable_pugixml" = "yes"; then
|
||||
AC_DEFINE(USE_PUGIXML,1,[use pugixml instead of xmltree])
|
||||
fi
|
||||
|
||||
|
||||
# FLAC - Free Lossless Audio Codec
|
||||
AC_ARG_ENABLE(flac,
|
||||
AS_HELP_STRING(--enable-flac,include FLAC support),
|
||||
|
@@ -177,7 +177,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
|
||||
if (strcmp(xmlGetName(root),"root"))
|
||||
throw std::runtime_error(std::string("XML: no root"));
|
||||
|
||||
for (node = root->xmlChildrenNode; node; node=node->xmlNextNode)
|
||||
for (node = xmlChildrenNode(root); node; node=xmlNextNode(node))
|
||||
{
|
||||
if (!strcmp(xmlGetName(node),"URLBase"))
|
||||
{
|
||||
@@ -188,19 +188,19 @@ CUPnPDevice::CUPnPDevice(std::string url)
|
||||
|
||||
}
|
||||
|
||||
node = root->xmlChildrenNode;
|
||||
node = xmlChildrenNode(root);
|
||||
if (!node)
|
||||
throw std::runtime_error(std::string("XML: no root child"));
|
||||
|
||||
while (strcmp(xmlGetName(node),"device"))
|
||||
{
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
if (!node)
|
||||
throw std::runtime_error(std::string("XML: no device"));
|
||||
}
|
||||
device = node;
|
||||
|
||||
for (node=device->xmlChildrenNode; node; node=node->xmlNextNode)
|
||||
for (node=xmlChildrenNode(device); node; node=xmlNextNode(node))
|
||||
{
|
||||
if (!strcmp(xmlGetName(node),"deviceType"))
|
||||
devicetype = std::string(xmlGetData(node)?xmlGetData(node):"");
|
||||
@@ -237,7 +237,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
|
||||
|
||||
if (!strcmp(xmlGetName(node),"iconList"))
|
||||
{
|
||||
for (icon=node->xmlChildrenNode; icon; icon=icon->xmlNextNode)
|
||||
for (icon=xmlChildrenNode(node); icon; icon=xmlNextNode(icon))
|
||||
{
|
||||
bool foundm = false;
|
||||
bool foundw = false;
|
||||
@@ -247,7 +247,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
|
||||
|
||||
if (strcmp(xmlGetName(icon),"icon"))
|
||||
throw std::runtime_error(std::string("XML: no icon"));
|
||||
for (snode=icon->xmlChildrenNode; snode; snode=snode->xmlNextNode)
|
||||
for (snode=xmlChildrenNode(icon); snode; snode=xmlNextNode(snode))
|
||||
{
|
||||
if (!strcmp(xmlGetName(snode),"mimetype"))
|
||||
{
|
||||
@@ -292,7 +292,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
|
||||
if (!strcmp(xmlGetName(node),"serviceList"))
|
||||
{
|
||||
servicefound = true;
|
||||
for (service=node->xmlChildrenNode; service; service=service->xmlNextNode)
|
||||
for (service=xmlChildrenNode(node); service; service=xmlNextNode(service))
|
||||
{
|
||||
bool foundc = false;
|
||||
bool founde = false;
|
||||
@@ -300,7 +300,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
|
||||
|
||||
if (strcmp(xmlGetName(service),"service"))
|
||||
throw std::runtime_error(std::string("XML: no service"));
|
||||
for (snode=service->xmlChildrenNode; snode; snode=snode->xmlNextNode)
|
||||
for (snode=xmlChildrenNode(service); snode; snode=xmlNextNode(snode))
|
||||
{
|
||||
if (!strcmp(xmlGetName(snode),"serviceType"))
|
||||
{
|
||||
|
@@ -112,7 +112,7 @@ std::list<UPnPAttribute> CUPnPService::SendSOAP(std::string action, std::list<UP
|
||||
if (envelope != "Envelope")
|
||||
throw std::runtime_error(std::string("XML: no envelope"));
|
||||
|
||||
node = root->xmlChildrenNode;
|
||||
node = xmlChildrenNode(root);
|
||||
if (!node)
|
||||
throw std::runtime_error(std::string("XML: no envelope child"));
|
||||
|
||||
@@ -124,7 +124,7 @@ std::list<UPnPAttribute> CUPnPService::SendSOAP(std::string action, std::list<UP
|
||||
if (soapbody != "Body")
|
||||
throw std::runtime_error(std::string("XML: no soap body"));
|
||||
|
||||
node = node->xmlChildrenNode;
|
||||
node = xmlChildrenNode(node);
|
||||
if (!node)
|
||||
throw std::runtime_error(std::string("XML: no soap body child"));
|
||||
|
||||
@@ -138,13 +138,13 @@ std::list<UPnPAttribute> CUPnPService::SendSOAP(std::string action, std::list<UP
|
||||
std::string faultstring, upnpcode, upnpdesc, errstr;
|
||||
if (soapresponse != "Fault")
|
||||
throw std::runtime_error(std::string("XML: http error without soap fault: ")+rcode);
|
||||
for (node=node->xmlChildrenNode; node; node=node->xmlNextNode)
|
||||
for (node=xmlChildrenNode(node); node; node=xmlNextNode(node))
|
||||
{
|
||||
if (!strcmp(xmlGetName(node),"detail"))
|
||||
{
|
||||
snode=node->xmlChildrenNode;
|
||||
snode=xmlChildrenNode(node);
|
||||
if (snode)
|
||||
for (snode=snode->xmlChildrenNode; snode; snode=snode->xmlNextNode)
|
||||
for (snode=xmlChildrenNode(snode); snode; snode=xmlNextNode(snode))
|
||||
{
|
||||
errstr=xmlGetName(snode);
|
||||
pos = errstr.find(":");
|
||||
@@ -168,7 +168,7 @@ std::list<UPnPAttribute> CUPnPService::SendSOAP(std::string action, std::list<UP
|
||||
if (soapresponse != action + "Response")
|
||||
throw std::runtime_error(std::string("XML: no soap response"));
|
||||
|
||||
for (node=node->xmlChildrenNode; node; node=node->xmlNextNode)
|
||||
for (node=xmlChildrenNode(node); node; node=xmlNextNode(node))
|
||||
results.push_back(UPnPAttribute(xmlGetName(node), xmlGetData(node)));
|
||||
|
||||
xmlFreeDoc(parser);
|
||||
|
@@ -1,11 +1,18 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(srcdir)/xmltok
|
||||
-I$(top_srcdir)
|
||||
|
||||
if USE_PUGIXML
|
||||
else
|
||||
AM_CPPFLAGS += -I$(srcdir)/xmltok
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS = -fno-rtti -fno-exceptions
|
||||
|
||||
noinst_LIBRARIES = libtuxbox-xmltree.a
|
||||
|
||||
libtuxbox_xmltree_a_SOURCES = \
|
||||
hashtab.c xmlparse.cpp xmlrole.c xmltok.c xmltree.cpp xmlinterface.cpp
|
||||
libtuxbox_xmltree_a_SOURCES = xmlinterface.cpp
|
||||
if USE_PUGIXML
|
||||
else
|
||||
libtuxbox_xmltree_a_SOURCES += hashtab.c xmlparse.cpp xmlrole.c xmltok.c xmltree.cpp
|
||||
endif
|
||||
|
@@ -68,17 +68,46 @@ long xmlGetSignedNumericAttribute(const xmlNodePtr node, const char *name, const
|
||||
xmlNodePtr xmlGetNextOccurence(xmlNodePtr cur, const char * s)
|
||||
{
|
||||
while ((cur != NULL) && (strcmp(xmlGetName(cur), s) != 0))
|
||||
cur = cur->xmlNextNode;
|
||||
cur = xmlNextNode(cur);
|
||||
return cur;
|
||||
}
|
||||
#if USE_PUGIXML
|
||||
std::string to_utf8(unsigned int cp)
|
||||
{
|
||||
std::string result;
|
||||
int count;
|
||||
if (cp < 0x0080)
|
||||
count = 1;
|
||||
else if (cp < 0x0800)
|
||||
count = 2;
|
||||
else if (cp < 0x10000)
|
||||
count = 3;
|
||||
else if (cp <= 0x10FFFF)
|
||||
count = 4;
|
||||
else
|
||||
return result;
|
||||
|
||||
result.resize(count);
|
||||
for (int i = count-1; i > 0; --i)
|
||||
{
|
||||
result[i] = (char) (0x80 | (cp & 0x3F));
|
||||
cp >>= 6;
|
||||
}
|
||||
for (int i = 0; i < count; ++i)
|
||||
cp |= (1 << (7-i));
|
||||
|
||||
result[0] = (char) cp;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
std::string Unicode_Character_to_UTF8(const int character)
|
||||
{
|
||||
#ifdef USE_LIBXML
|
||||
xmlChar buf[5];
|
||||
int length = xmlCopyChar(4, buf, character);
|
||||
return std::string((char*)buf, length);
|
||||
#elif (defined( USE_PUGIXML ) )
|
||||
return to_utf8(character);
|
||||
#else /* USE_LIBXML */
|
||||
char buf[XML_UTF8_ENCODE_MAX];
|
||||
int length = XmlUtf8Encode(character, buf);
|
||||
@@ -124,7 +153,7 @@ std::string convert_UTF8_To_UTF8_XML(const char* s)
|
||||
}
|
||||
|
||||
#ifdef USE_LIBXML
|
||||
xmlDocPtr parseXml(const char * data)
|
||||
xmlDocPtr parseXml(const char * data,char *)
|
||||
{
|
||||
xmlDocPtr doc;
|
||||
xmlNodePtr cur;
|
||||
@@ -150,7 +179,7 @@ xmlDocPtr parseXml(const char * data)
|
||||
}
|
||||
}
|
||||
|
||||
xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* = true */)
|
||||
xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* = true */,char *)
|
||||
{
|
||||
xmlDocPtr doc;
|
||||
xmlNodePtr cur;
|
||||
@@ -175,6 +204,46 @@ xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* =
|
||||
return doc;
|
||||
}
|
||||
}
|
||||
|
||||
#elif (defined( USE_PUGIXML ) )
|
||||
xmlDocPtr parseXml(const char * data,const char* /*encoding*/)
|
||||
{
|
||||
pugi::xml_document* tree_parser = new pugi::xml_document();
|
||||
|
||||
if (!tree_parser->load_string(data))
|
||||
{
|
||||
delete tree_parser;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!tree_parser->root())
|
||||
{
|
||||
printf("Error: No Root Node\n");
|
||||
delete tree_parser;
|
||||
return NULL;
|
||||
}
|
||||
return tree_parser;
|
||||
}
|
||||
|
||||
xmlDocPtr parseXmlFile(const char * filename, bool,const char* /*encoding*/)
|
||||
{
|
||||
pugi::xml_document* tree_parser = new pugi::xml_document();
|
||||
|
||||
if (!tree_parser->load_file(filename))
|
||||
{
|
||||
delete tree_parser;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!tree_parser->root())
|
||||
{
|
||||
printf("Error: No Root Node\n");
|
||||
delete tree_parser;
|
||||
return NULL;
|
||||
}
|
||||
return tree_parser;
|
||||
}
|
||||
|
||||
#else /* USE_LIBXML */
|
||||
xmlDocPtr parseXml(const char * data,const char *encoding)
|
||||
{
|
||||
|
@@ -43,18 +43,42 @@
|
||||
#define xmlNextNode next
|
||||
inline const char* xmlGetAttribute (xmlNodePtr cur, const char * s) { return (const char *)xmlGetProp(cur, (const xmlChar *)s); };
|
||||
inline const char* xmlGetName (xmlNodePtr cur) { return (const char *)(cur->name); };
|
||||
/* ------------------------------------------------ USE_PUGIXML ------------------------------------------------*/
|
||||
#elif (defined( USE_PUGIXML ) )
|
||||
#include <pugixml.hpp>
|
||||
typedef pugi::xml_document *xmlDocPtr;
|
||||
typedef pugi::xml_node xmlNodePtr;
|
||||
inline void xmlFreeDoc (xmlDocPtr doc) { delete doc; }
|
||||
inline const char* xmlGetName (const xmlNodePtr cur) { return cur.name(); }
|
||||
inline xmlNodePtr xmlNextNode (xmlNodePtr cur) { return cur.next_sibling(); }
|
||||
inline xmlNodePtr xmlChildrenNode (xmlNodePtr cur) { return cur.first_child(); }
|
||||
inline const char* xmlGetData (xmlNodePtr cur) { return cur.child_value(); }
|
||||
|
||||
inline const char* xmlGetAttribute (const xmlNodePtr cur, const char *s)
|
||||
{
|
||||
if(cur.attribute(s))
|
||||
return cur.attribute(s).value();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline xmlNodePtr xmlDocGetRootElement(xmlDocPtr doc)
|
||||
{
|
||||
xmlNodePtr firstNode = doc->root().first_child();
|
||||
return firstNode;
|
||||
}
|
||||
/* ------------------------------------------------ END of USE_PUGIXML ------------------------------------------------*/
|
||||
#else /* use libxmltree */
|
||||
#include "xmltree.h"
|
||||
typedef XMLTreeParser* xmlDocPtr;
|
||||
typedef XMLTreeNode* xmlNodePtr;
|
||||
#define xmlChildrenNode GetChild()
|
||||
#define xmlNextNode GetNext()
|
||||
inline xmlNodePtr xmlDocGetRootElement(xmlDocPtr doc) { return doc->RootNode(); }
|
||||
inline void xmlFreeDoc (xmlDocPtr doc) { delete doc; }
|
||||
inline const char* xmlGetAttribute (xmlNodePtr cur, const char *s) { return cur->GetAttributeValue(s); }
|
||||
inline const char* xmlGetName (xmlNodePtr cur) { return cur->GetType(); }
|
||||
inline const char* xmlGetData (xmlNodePtr cur) { return cur->GetData(); }
|
||||
inline xmlNodePtr xmlChildrenNode (xmlNodePtr cur) { return cur->GetChild(); }
|
||||
inline xmlNodePtr xmlNextNode (xmlNodePtr cur) { return cur->GetNext(); }
|
||||
inline xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc) { return doc->RootNode(); }
|
||||
inline void xmlFreeDoc (xmlDocPtr doc) { delete doc; }
|
||||
inline const char* xmlGetAttribute (xmlNodePtr cur, const char *s) { return cur->GetAttributeValue(s); }
|
||||
inline const char* xmlGetName (xmlNodePtr cur) { return cur->GetType(); }
|
||||
inline const char* xmlGetData (xmlNodePtr cur) { return cur->GetData(); }
|
||||
#endif /* USE_LIBXML */
|
||||
|
||||
|
||||
|
@@ -36,6 +36,10 @@ SUBDIRS += lcddisplay
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/lib/libtriple
|
||||
endif
|
||||
|
||||
if USE_PUGIXML
|
||||
PUGIXML_LIBS = -lpugixml
|
||||
endif
|
||||
|
||||
if USE_TREMOR
|
||||
VORBISLIBS = @VORBISIDEC_LIBS@
|
||||
else
|
||||
@@ -115,6 +119,7 @@ neutrino_LDADD = \
|
||||
@AVCODEC_LIBS@ \
|
||||
$(ADEC_LIBS) \
|
||||
@SIGC_LIBS@ \
|
||||
$(PUGIXML_LIBS) \
|
||||
-ldvbsi++ \
|
||||
-ljpeg \
|
||||
-lOpenThreads \
|
||||
|
@@ -207,7 +207,7 @@ bool readEPGFilter(void)
|
||||
epg_filter_is_whitelist = true;
|
||||
if (xmlGetNumericAttribute(filter, "except_current_next", 10) == 1)
|
||||
epg_filter_except_current_next = true;
|
||||
filter = filter->xmlChildrenNode;
|
||||
filter = xmlChildrenNode(filter);
|
||||
|
||||
while (filter) {
|
||||
|
||||
@@ -219,7 +219,7 @@ bool readEPGFilter(void)
|
||||
else
|
||||
addEPGFilter(onid, tsid, sid);
|
||||
|
||||
filter = filter->xmlNextNode;
|
||||
filter = xmlNextNode(filter);
|
||||
}
|
||||
}
|
||||
xmlFreeDoc(filter_parser);
|
||||
@@ -239,7 +239,7 @@ void readDVBTimeFilter(void)
|
||||
dprintf("Reading DVBTimeFilters\n");
|
||||
|
||||
xmlNodePtr filter = xmlDocGetRootElement(filter_parser);
|
||||
filter = filter->xmlChildrenNode;
|
||||
filter = xmlChildrenNode(filter);
|
||||
|
||||
while (filter) {
|
||||
|
||||
@@ -248,7 +248,7 @@ void readDVBTimeFilter(void)
|
||||
sid = xmlGetNumericAttribute(filter, "serviceID", 16);
|
||||
addNoDVBTimelist(onid, tsid, sid);
|
||||
|
||||
filter = filter->xmlNextNode;
|
||||
filter = xmlNextNode(filter);
|
||||
}
|
||||
xmlFreeDoc(filter_parser);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ void deleteOldfileEvents(const char *epgdir)
|
||||
if (filter_parser != NULL)
|
||||
{
|
||||
xmlNodePtr filter = xmlDocGetRootElement(filter_parser);
|
||||
filter = filter->xmlChildrenNode;
|
||||
filter = xmlChildrenNode(filter);
|
||||
|
||||
while (filter) {
|
||||
const char * name = xmlGetAttribute(filter, "name");
|
||||
@@ -278,7 +278,7 @@ void deleteOldfileEvents(const char *epgdir)
|
||||
file +="/";
|
||||
file +=filename;
|
||||
unlink(file.c_str());
|
||||
filter = filter->xmlNextNode;
|
||||
filter = xmlNextNode(filter);
|
||||
}
|
||||
}
|
||||
xmlFreeDoc(filter_parser);
|
||||
@@ -290,9 +290,9 @@ void *insertEventsfromFile(void * data)
|
||||
set_threadname(__func__);
|
||||
reader_ready=false;
|
||||
xmlDocPtr event_parser = NULL;
|
||||
xmlNodePtr eventfile = NULL;
|
||||
xmlNodePtr service = NULL;
|
||||
xmlNodePtr event = NULL;
|
||||
xmlNodePtr eventfile;
|
||||
xmlNodePtr service;
|
||||
xmlNodePtr event;
|
||||
t_original_network_id onid = 0;
|
||||
t_transport_stream_id tsid = 0;
|
||||
t_service_id sid = 0;
|
||||
@@ -313,7 +313,8 @@ void *insertEventsfromFile(void * data)
|
||||
printdate_ms(stdout);
|
||||
printf("[sectionsd] Reading Information from file %s:\n", indexname.c_str());
|
||||
|
||||
eventfile = xmlDocGetRootElement(index_parser)->xmlChildrenNode;
|
||||
eventfile = xmlDocGetRootElement(index_parser);
|
||||
eventfile = xmlChildrenNode(eventfile);
|
||||
|
||||
while (eventfile) {
|
||||
const char * name = xmlGetAttribute(eventfile, "name");
|
||||
@@ -323,17 +324,18 @@ void *insertEventsfromFile(void * data)
|
||||
epgname = epg_dir + filename;
|
||||
if (!(event_parser = parseXmlFile(epgname.c_str()))) {
|
||||
dprintf("unable to open %s for reading\n", epgname.c_str());
|
||||
eventfile = eventfile->xmlNextNode;
|
||||
eventfile = xmlNextNode(eventfile);
|
||||
continue;
|
||||
}
|
||||
service = xmlDocGetRootElement(event_parser)->xmlChildrenNode;
|
||||
service = xmlDocGetRootElement(event_parser);
|
||||
service = xmlChildrenNode(service);
|
||||
|
||||
while (service) {
|
||||
onid = xmlGetNumericAttribute(service, "original_network_id", 16);
|
||||
tsid = xmlGetNumericAttribute(service, "transport_stream_id", 16);
|
||||
sid = xmlGetNumericAttribute(service, "service_id", 16);
|
||||
|
||||
event = service->xmlChildrenNode;
|
||||
event = xmlChildrenNode(service);
|
||||
|
||||
while (event) {
|
||||
SIevent e(onid,tsid,sid,xmlGetNumericAttribute(event, "id", 16));
|
||||
@@ -345,66 +347,66 @@ void *insertEventsfromFile(void * data)
|
||||
|
||||
xmlNodePtr node;
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "name"))) {
|
||||
const char *s = xmlGetAttribute(node, "string");
|
||||
if (s)
|
||||
e.setName(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang")), s);
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "text"))) {
|
||||
const char *s = xmlGetAttribute(node, "string");
|
||||
if (s)
|
||||
e.setText(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang")), s);
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "item"))) {
|
||||
#ifdef USE_ITEM_DESCRIPTION
|
||||
const char *s = xmlGetAttribute(node, "string");
|
||||
if (s)
|
||||
e.item = s;
|
||||
#endif
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "item_description"))) {
|
||||
#ifdef USE_ITEM_DESCRIPTION
|
||||
const char *s = xmlGetAttribute(node, "string");
|
||||
if (s)
|
||||
e.itemDescription = s;
|
||||
#endif
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "extended_text"))) {
|
||||
const char *l = xmlGetAttribute(node, "lang");
|
||||
const char *s = xmlGetAttribute(node, "string");
|
||||
if (l && s)
|
||||
e.appendExtendedText(ZapitTools::UTF8_to_Latin1(l), s);
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "time"))) {
|
||||
e.times.insert(SItime(xmlGetNumericAttribute(node, "start_time", 10),
|
||||
xmlGetNumericAttribute(node, "duration", 10)));
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "content"))) {
|
||||
const char cl = xmlGetNumericAttribute(node, "class", 16);
|
||||
contentClassification += cl;
|
||||
const char cl2 = xmlGetNumericAttribute(node, "user", 16);
|
||||
userClassification += cl2;
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "component"))) {
|
||||
SIcomponent c;
|
||||
c.streamContent = xmlGetNumericAttribute(node, "stream_content", 16);
|
||||
@@ -415,10 +417,10 @@ void *insertEventsfromFile(void * data)
|
||||
c.setComponent(s);
|
||||
//e.components.insert(c);
|
||||
e.components.push_back(c);
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "parental_rating"))) {
|
||||
const char *s = xmlGetAttribute(node, "country");
|
||||
if (s)
|
||||
@@ -428,10 +430,10 @@ void *insertEventsfromFile(void * data)
|
||||
#endif
|
||||
e.ratings.push_back(SIparentalRating(ZapitTools::UTF8_to_Latin1(s),
|
||||
(unsigned char) xmlGetNumericAttribute(node, "rating", 10)));
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
node = event->xmlChildrenNode;
|
||||
node = xmlChildrenNode(event);
|
||||
while ((node = xmlGetNextOccurence(node, "linkage"))) {
|
||||
SIlinkage l;
|
||||
l.linkageType = xmlGetNumericAttribute(node, "type", 16);
|
||||
@@ -442,7 +444,7 @@ void *insertEventsfromFile(void * data)
|
||||
if (s)
|
||||
l.name = s;
|
||||
e.linkage_descs.insert(e.linkage_descs.end(), l);
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
|
||||
if (!contentClassification.empty()) {
|
||||
@@ -459,14 +461,14 @@ void *insertEventsfromFile(void * data)
|
||||
addEvent(e, 0);
|
||||
ev_count++;
|
||||
|
||||
event = event->xmlNextNode;
|
||||
event = xmlNextNode(event);
|
||||
}
|
||||
|
||||
service = service->xmlNextNode;
|
||||
service = xmlNextNode(service);
|
||||
}
|
||||
xmlFreeDoc(event_parser);
|
||||
|
||||
eventfile = eventfile->xmlNextNode;
|
||||
eventfile = xmlNextNode(eventfile);
|
||||
}
|
||||
|
||||
xmlFreeDoc(index_parser);
|
||||
|
@@ -1114,7 +1114,7 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag,
|
||||
|
||||
if (answer_parser != NULL) {
|
||||
xmlNodePtr element = xmlDocGetRootElement(answer_parser);
|
||||
element = element->xmlChildrenNode;
|
||||
element = xmlChildrenNode(element);
|
||||
xmlNodePtr element_tmp = element;
|
||||
if (element == NULL) {
|
||||
printf("[openFilebrowser] No valid XML File.\n");
|
||||
@@ -1124,7 +1124,7 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag,
|
||||
// count # of entries
|
||||
while (element) {
|
||||
maxProgress++;
|
||||
element = element->xmlNextNode;
|
||||
element = xmlNextNode(element);
|
||||
}
|
||||
element = element_tmp;
|
||||
long listPos = -1;
|
||||
@@ -1150,7 +1150,7 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag,
|
||||
|
||||
if (usechild) {
|
||||
const char *type = NULL;
|
||||
xmlNodePtr child = element->xmlChildrenNode;
|
||||
xmlNodePtr child = xmlChildrenNode(element);
|
||||
while (child) {
|
||||
if (strcmp(xmlGetName(child), nametag) == 0)
|
||||
name = xmlGetData(child);
|
||||
@@ -1163,7 +1163,7 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag,
|
||||
if (ptr)
|
||||
bitrate = atoi(ptr);
|
||||
}
|
||||
child = child->xmlNextNode;
|
||||
child = xmlNextNode(child);
|
||||
}
|
||||
if(type){
|
||||
if (strcmp("audio/mpeg", type) == 0) skip = false;
|
||||
@@ -1190,7 +1190,7 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag,
|
||||
else
|
||||
addUrl2Playlist(url, name, bitrate);
|
||||
}
|
||||
element = element->xmlNextNode;
|
||||
element = xmlNextNode(element);
|
||||
g_RCInput->getMsg(&msg, &data, 0);
|
||||
|
||||
}
|
||||
|
@@ -448,7 +448,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", (int)answer.size());
|
||||
xml_decode = 1;
|
||||
else if (strcmp(xmlGetName(element), "stationlist") == 0)
|
||||
xml_decode = 2;
|
||||
element = element->xmlChildrenNode;
|
||||
element = xmlChildrenNode(element);
|
||||
|
||||
if (element == NULL) {
|
||||
printf("[FileBrowser] SC: Directory cannot be read.\n");
|
||||
@@ -523,7 +523,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", (int)answer.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
element = element->xmlNextNode;
|
||||
element = xmlNextNode(element);
|
||||
}
|
||||
}
|
||||
xmlFreeDoc(answer_parser);
|
||||
|
@@ -139,7 +139,8 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
|
||||
{
|
||||
tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, &g_settings.timezone, true, tzNotifier, CRCInput::RC_green, NULL, true);
|
||||
tzSelect->setHint("", LOCALE_MENU_HINT_TIMEZONE);
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode;
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser);
|
||||
search = xmlChildrenNode(search);
|
||||
bool found = false;
|
||||
|
||||
while (search)
|
||||
@@ -163,7 +164,7 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
|
||||
}
|
||||
}
|
||||
}
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
|
@@ -250,7 +250,7 @@ std::vector<UPnPEntry> *CUpnpBrowserGui::decodeResult(std::string result)
|
||||
}
|
||||
entries = new std::vector<UPnPEntry>;
|
||||
|
||||
for (node=root->xmlChildrenNode; node; node=node->xmlNextNode)
|
||||
for (node=xmlChildrenNode(root); node; node=xmlNextNode(node))
|
||||
{
|
||||
bool isdir;
|
||||
std::string title, artist = "", album = "", albumArtURI = "", id, children;
|
||||
@@ -260,7 +260,7 @@ std::vector<UPnPEntry> *CUpnpBrowserGui::decodeResult(std::string result)
|
||||
{
|
||||
std::vector<UPnPResource> resources;
|
||||
isdir=true;
|
||||
for (snode=node->xmlChildrenNode; snode; snode=snode->xmlNextNode)
|
||||
for (snode=xmlChildrenNode(node); snode; snode=xmlNextNode(snode))
|
||||
{
|
||||
type=xmlGetName(snode);
|
||||
p = strchr(type,':');
|
||||
@@ -294,7 +294,7 @@ std::vector<UPnPEntry> *CUpnpBrowserGui::decodeResult(std::string result)
|
||||
std::string protocol, prot, network, mime, additional;
|
||||
CFile::FileType ftype = CFile::FILE_UNKNOWN;
|
||||
isdir=false;
|
||||
for (snode=node->xmlChildrenNode; snode; snode=snode->xmlNextNode)
|
||||
for (snode=xmlChildrenNode(node); snode; snode=xmlNextNode(snode))
|
||||
{
|
||||
std::string duration, url, size;
|
||||
unsigned int i;
|
||||
|
@@ -452,7 +452,8 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
||||
|
||||
xmlDocPtr parser = parseXmlFile("/etc/timezone.xml");
|
||||
if (parser != NULL) {
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode;
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser);
|
||||
search = xmlChildrenNode(search);
|
||||
while (search) {
|
||||
if (!strcmp(xmlGetName(search), "zone")) {
|
||||
const char *nptr = xmlGetAttribute(search, "name");
|
||||
@@ -468,7 +469,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
}
|
||||
xmlFreeDoc(parser);
|
||||
}
|
||||
|
@@ -290,7 +290,8 @@ bool cYTFeedParser::parseFeedXml(std::string &answer)
|
||||
prev.clear();
|
||||
total.clear();
|
||||
start.clear();
|
||||
xmlNodePtr entry = xmlDocGetRootElement(answer_parser)->xmlChildrenNode;
|
||||
xmlNodePtr entry = xmlDocGetRootElement(answer_parser);
|
||||
entry = xmlChildrenNode(entry);
|
||||
while (entry) {
|
||||
std::string name = getXmlName(entry);
|
||||
#ifdef DEBUG_PARSER
|
||||
@@ -314,10 +315,10 @@ bool cYTFeedParser::parseFeedXml(std::string &answer)
|
||||
}
|
||||
}
|
||||
else if (name != "entry") {
|
||||
entry = entry->xmlNextNode;
|
||||
entry = xmlNextNode(entry);
|
||||
continue;
|
||||
}
|
||||
xmlNodePtr node = entry->xmlChildrenNode;
|
||||
xmlNodePtr node = xmlChildrenNode(entry);
|
||||
cYTVideoInfo vinfo;
|
||||
std::string thumbnail;
|
||||
while (node) {
|
||||
@@ -335,7 +336,7 @@ bool cYTFeedParser::parseFeedXml(std::string &answer)
|
||||
vinfo.published = getXmlData(node).substr(0, 10);
|
||||
}
|
||||
else if (name == "author") {
|
||||
xmlNodePtr author = node->xmlChildrenNode;
|
||||
xmlNodePtr author = xmlChildrenNode(node);
|
||||
while(author) {
|
||||
name = getXmlName(author);
|
||||
if (name == "name") {
|
||||
@@ -344,11 +345,11 @@ bool cYTFeedParser::parseFeedXml(std::string &answer)
|
||||
#endif
|
||||
vinfo.author = getXmlData(author);
|
||||
}
|
||||
author = author->xmlNextNode;
|
||||
author = xmlNextNode(author);
|
||||
}
|
||||
}
|
||||
else if (name == "media:group") {
|
||||
xmlNodePtr media = node->xmlChildrenNode;
|
||||
xmlNodePtr media = xmlChildrenNode(node);
|
||||
while (media) {
|
||||
name = getXmlName(media);
|
||||
if (name == "media:description") {
|
||||
@@ -388,10 +389,10 @@ bool cYTFeedParser::parseFeedXml(std::string &answer)
|
||||
else if (name == "media:title") {
|
||||
}
|
||||
#endif
|
||||
media = media->xmlNextNode;
|
||||
media = xmlNextNode(media);
|
||||
}
|
||||
}
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
if (!vinfo.id.empty()) {
|
||||
/* save first one, if wanted not found */
|
||||
@@ -400,7 +401,7 @@ bool cYTFeedParser::parseFeedXml(std::string &answer)
|
||||
vinfo.ret = false;
|
||||
videos.push_back(vinfo);
|
||||
}
|
||||
entry = entry->xmlNextNode;
|
||||
entry = xmlNextNode(entry);
|
||||
}
|
||||
xmlFreeDoc(answer_parser);
|
||||
|
||||
|
@@ -382,7 +382,7 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
||||
return;
|
||||
|
||||
xmlNodePtr root = xmlDocGetRootElement(parser);
|
||||
xmlNodePtr search = root->xmlChildrenNode;
|
||||
xmlNodePtr search = xmlChildrenNode(root);
|
||||
xmlNodePtr channel_node;
|
||||
|
||||
if (search) {
|
||||
@@ -409,7 +409,7 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
||||
newBouquet->bLocked = locked ? (strcmp(locked, "1") == 0) : false;
|
||||
newBouquet->bFav = (strcmp(name, "favorites") == 0);
|
||||
newBouquet->bScanEpg = scanepg ? (strcmp(scanepg, "1") == 0) : false;
|
||||
channel_node = search->xmlChildrenNode;
|
||||
channel_node = xmlChildrenNode(search);
|
||||
while ((channel_node = xmlGetNextOccurence(channel_node, "S")) != NULL) {
|
||||
std::string name2;
|
||||
name = xmlGetAttribute(channel_node, "n");
|
||||
@@ -464,7 +464,7 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
||||
CServiceManager::getInstance()->SetServicesChanged(false);
|
||||
}
|
||||
|
||||
channel_node = channel_node->xmlNextNode;
|
||||
channel_node = xmlNextNode(channel_node);
|
||||
if(!bUser) {
|
||||
/* set satellite position for provider bouquets.
|
||||
reset position to 0, if position not match - means mixed bouquet */
|
||||
@@ -476,7 +476,7 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
||||
}
|
||||
if(!bUser)
|
||||
newBouquet->sortBouquet();
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
}
|
||||
INFO("total: %d bouquets", (int)Bouquets.size());
|
||||
}
|
||||
|
@@ -422,10 +422,10 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa
|
||||
t.dump("[zapit] duplicate in all transponders:");
|
||||
|
||||
/* read channels that belong to the current transponder */
|
||||
ParseChannels(node->xmlChildrenNode, transport_stream_id, original_network_id, satellitePosition, freq, feparams.polarization, delsys);
|
||||
ParseChannels(xmlChildrenNode(node), transport_stream_id, original_network_id, satellitePosition, freq, feparams.polarization, delsys);
|
||||
|
||||
/* hop to next transponder */
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
UpdateSatTransponders(satellitePosition);
|
||||
return;
|
||||
@@ -465,6 +465,7 @@ void CServiceManager::ParseChannels(xmlNodePtr node, const t_transport_stream_id
|
||||
const char *ptr = xmlGetAttribute(node, "action");
|
||||
bool remove = ptr ? (!strcmp(ptr, "remove") || !strcmp(ptr, "replace")) : false;
|
||||
bool add = ptr ? (!strcmp(ptr, "add") || !strcmp(ptr, "replace")) : true;
|
||||
|
||||
if (remove) {
|
||||
int result = allchans.erase(chid);
|
||||
printf("[getservices]: %s '%s' (sid=0x%x): %s", add ? "replacing" : "removing",
|
||||
@@ -474,7 +475,7 @@ void CServiceManager::ParseChannels(xmlNodePtr node, const t_transport_stream_id
|
||||
add = false;//dont replace not existing channel
|
||||
}
|
||||
if(!add) {
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
continue;
|
||||
}
|
||||
audio_map_set_t * pidmap = CZapit::getInstance()->GetSavedPids(chid);
|
||||
@@ -527,7 +528,7 @@ void CServiceManager::ParseChannels(xmlNodePtr node, const t_transport_stream_id
|
||||
channel->type = vtype;
|
||||
}
|
||||
}
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -555,7 +556,7 @@ void CServiceManager::FindTransponder(xmlNodePtr search)
|
||||
delsys = ALL_SAT;
|
||||
}
|
||||
else {
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
@@ -564,9 +565,9 @@ void CServiceManager::FindTransponder(xmlNodePtr search)
|
||||
t_satellite_position satellitePosition = GetSatellitePosition(name);
|
||||
#endif
|
||||
DBG("going to parse dvb-%c provider %s\n", xmlGetName(search)[0], xmlGetAttribute(search, "name"));
|
||||
ParseTransponders(search->xmlChildrenNode, satellitePosition, delsys);
|
||||
ParseTransponders(xmlChildrenNode(search), satellitePosition, delsys);
|
||||
newfound++;
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -577,7 +578,7 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr
|
||||
fake_tid = fake_nid = 0;
|
||||
satelliteTransponders[satellitePosition].clear();
|
||||
|
||||
xmlNodePtr tps = search->xmlChildrenNode;
|
||||
xmlNodePtr tps = xmlChildrenNode(search);
|
||||
|
||||
while ((tps = xmlGetNextOccurence(tps, "transponder")) != NULL) {
|
||||
memset(&feparams, 0x00, sizeof(FrontendParameters));
|
||||
@@ -730,7 +731,7 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr
|
||||
|
||||
fake_nid ++; fake_tid ++;
|
||||
|
||||
tps = tps->xmlNextNode;
|
||||
tps = xmlNextNode(tps);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -828,7 +829,8 @@ bool CServiceManager::LoadScanXml(delivery_system_t delsys)
|
||||
/* fake position for non-satellite */
|
||||
t_satellite_position position = 0;
|
||||
|
||||
xmlNodePtr search = xmlDocGetRootElement(scanInputParser)->xmlChildrenNode;
|
||||
xmlNodePtr search = xmlDocGetRootElement(scanInputParser);
|
||||
search = xmlChildrenNode(search);
|
||||
while (search) {
|
||||
std::string delivery_name = xmlGetName(search);
|
||||
if (delivery_name == "sat") {
|
||||
@@ -848,7 +850,7 @@ bool CServiceManager::LoadScanXml(delivery_system_t delsys)
|
||||
}
|
||||
|
||||
ParseSatTransponders(delsys, search, position);
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
}
|
||||
delete scanInputParser;
|
||||
scanInputParser = NULL;
|
||||
@@ -908,7 +910,8 @@ bool CServiceManager::LoadServices(bool only_current)
|
||||
|
||||
parser = parseXmlFile(SERVICES_XML);
|
||||
if (parser != NULL) {
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode;
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser);
|
||||
search = xmlChildrenNode(search);
|
||||
while (search) {
|
||||
const char * name = xmlGetAttribute(search, "name");
|
||||
t_satellite_position position;
|
||||
@@ -929,9 +932,9 @@ bool CServiceManager::LoadServices(bool only_current)
|
||||
} else {
|
||||
}
|
||||
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
}
|
||||
FindTransponder(xmlDocGetRootElement(parser)->xmlChildrenNode);
|
||||
FindTransponder(xmlChildrenNode(xmlDocGetRootElement(parser)));
|
||||
xmlFreeDoc(parser);
|
||||
}
|
||||
|
||||
@@ -944,7 +947,7 @@ bool CServiceManager::LoadServices(bool only_current)
|
||||
continue;
|
||||
|
||||
xmlNodePtr l0 = xmlDocGetRootElement(parser);
|
||||
xmlNodePtr l1 = l0->xmlChildrenNode;
|
||||
xmlNodePtr l1 = xmlChildrenNode(l0);
|
||||
if (l1) {
|
||||
while ((xmlGetNextOccurence(l1, "webtv"))) {
|
||||
const char *title = xmlGetAttribute(l1, "title");
|
||||
@@ -957,7 +960,7 @@ bool CServiceManager::LoadServices(bool only_current)
|
||||
channel->flags = CZapitChannel::UPDATED;
|
||||
}
|
||||
|
||||
l1 = l1->xmlNextNode;
|
||||
l1 = xmlNextNode(l1);
|
||||
}
|
||||
}
|
||||
xmlFreeDoc(parser);
|
||||
@@ -987,7 +990,7 @@ do_current:
|
||||
if (CZapit::getInstance()->scanSDT() && (parser = parseXmlFile(CURRENTSERVICES_XML))) {
|
||||
newfound = 0;
|
||||
printf("[getservices] " CURRENTSERVICES_XML " found.\n");
|
||||
FindTransponder(xmlDocGetRootElement(parser)->xmlChildrenNode);
|
||||
FindTransponder(xmlChildrenNode(xmlDocGetRootElement(parser)));
|
||||
xmlFreeDoc(parser);
|
||||
unlink(CURRENTSERVICES_XML);
|
||||
if(newfound) {
|
||||
@@ -999,7 +1002,7 @@ do_current:
|
||||
if(!only_current) {
|
||||
parser = parseXmlFile(MYSERVICES_XML);
|
||||
if (parser != NULL) {
|
||||
FindTransponder(xmlDocGetRootElement(parser)->xmlChildrenNode);
|
||||
FindTransponder(xmlChildrenNode(xmlDocGetRootElement(parser)));
|
||||
xmlFreeDoc(parser);
|
||||
}
|
||||
}
|
||||
@@ -1292,7 +1295,8 @@ bool CServiceManager::LoadProviderMap()
|
||||
replace_map.clear();
|
||||
parser = parseXmlFile(PROVIDER_MAP_XML);
|
||||
if (parser != NULL) {
|
||||
xmlNodePtr node = xmlDocGetRootElement(parser)->xmlChildrenNode;
|
||||
xmlNodePtr node = xmlDocGetRootElement(parser);
|
||||
node = xmlChildrenNode(node);
|
||||
while ((node = xmlGetNextOccurence(node, "TS")) != NULL) {
|
||||
provider_replace replace;
|
||||
replace.transport_stream_id = xmlGetNumericAttribute(node, "id", 16);
|
||||
@@ -1310,7 +1314,7 @@ bool CServiceManager::LoadProviderMap()
|
||||
replace.transport_stream_id, replace.original_network_id,
|
||||
replace.frequency, replace.name.c_str(), replace.newname.c_str());
|
||||
replace_map.push_back(replace);
|
||||
node = node->xmlNextNode;
|
||||
node = xmlNextNode(node);
|
||||
}
|
||||
xmlFreeDoc(parser);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user