From 6fd378cfb11c8113d9ee495883c55f73a618d9ee Mon Sep 17 00:00:00 2001 From: nitroxmh Date: Tue, 24 Apr 2012 22:31:14 +0000 Subject: [PATCH] Feature: debugging for xmllist included git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1485 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- webfrontend/pgm3/CHANGED | 3 +++ webfrontend/pgm3/HISTORY | 3 +++ webfrontend/pgm3/index.php | 21 ++++++++++++--------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/webfrontend/pgm3/CHANGED b/webfrontend/pgm3/CHANGED index 854308257..edd66e1fb 100644 --- a/webfrontend/pgm3/CHANGED +++ b/webfrontend/pgm3/CHANGED @@ -210,3 +210,6 @@ It is not necessary to tell fhem that there are other logs. 2012-04-24 -- Bugfix: check for FHEM-Version not needed any more +2012-04-25 + -- Feature: debugging for xmllist included + diff --git a/webfrontend/pgm3/HISTORY b/webfrontend/pgm3/HISTORY index 3916bb2be..f8b8f659f 100644 --- a/webfrontend/pgm3/HISTORY +++ b/webfrontend/pgm3/HISTORY @@ -113,3 +113,6 @@ - Martin 2012-04-24 -- Bugfix: no need for checking FHEM-Version any more -- Bugfxi: the FS20-Type from Userdef the first time with a broken graphic + +- Martin 2012-04-25 + -- Feature: debugging for xmllist included diff --git a/webfrontend/pgm3/index.php b/webfrontend/pgm3/index.php index a5f0afff9..71b88d521 100644 --- a/webfrontend/pgm3/index.php +++ b/webfrontend/pgm3/index.php @@ -41,7 +41,7 @@ include "include/gnuplot.php"; include "include/functions.php"; -$pgm3version='120424'; +$pgm3version='120425'; @@ -318,25 +318,28 @@ if (!(list($xml_parser, $live) = new_xml_parser($live))) { die("could not parse XML input"); } + foreach($output as $data) { if (!xml_parse($xml_parser, $data)) { - die(sprintf("XML error: %s at line %d\n", - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))); - } + echo("There is a xmllist file for debugging under $AbsolutPath/tmp/debugxml

"); + $handle=fopen("tmp/debugxml","w"); + fwrite($handle,$outputvar); + fclose($handle); + die(sprintf("XML error: %s at line %d\n", + xml_error_string(xml_get_error_code($xml_parser)), + xml_get_current_line_number($xml_parser))); + }; } + xml_parser_free($xml_parser); - - - - #print_r($stack); #exit; + #searching for rooms/fs20/Logpaths $rooms=array(); $fs20devs=array();