summaryrefslogtreecommitdiff
path: root/src/xmlmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlmenu.cpp')
-rw-r--r--src/xmlmenu.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/xmlmenu.cpp b/src/xmlmenu.cpp
index b7d4ae7..99581c1 100644
--- a/src/xmlmenu.cpp
+++ b/src/xmlmenu.cpp
@@ -32,22 +32,19 @@
using namespace xmlpp;
using namespace std;
-MenuNode* XmlMenu::LoadXmlMenu(string menuFileName)
+MenuNode* XmlMenu::LoadXmlMenu(string menuFileName, string schemaFileName)
{
MenuNode* menuRoot = new MenuNode();
try
{
- DomParser parser;
+ dsyslog("loading menuorg config file from %s and schema from %s",menuFileName, schemaFileName);
- //TODO: patch the xmlfile with the xsd definition for validate the schema
- //parser.set_validate();
+ DomParser parser;
parser.set_substitute_entities(); //We just want the text to be resolved/unescaped automatically.
-// parser.parse_file(menuFileName);
- parser.parse_file("/var/lib/vdr/plugins/menuorg.xml");
+ parser.parse_file(menuFileName);
- //DtdValidator validator( dtdFileName );
- DtdValidator validator( "/var/lib/vdr/plugins/menuorg.dtd" );
+ DtdValidator validator(schemaFileName);
Document *pDoc = parser.get_document();
validator.validate( pDoc );