app = "mLohn"; } public function view($xml) { $this->printHeader(); print <<Beiträge Minijobzentrale UBER; $xmlExtractor = new XmlExtractor(); $xmlExtractor->openInput($xml); $xmlExtractor->extractElement(InputExtractor::EC_BEG, $elem, $value, $attrs); self::assert($elem, "MinijobBeitrage"); $xmlExtractor->extractElement(InputExtractor::EC_BEG, $elem, $value, $attrs); self::assert($elem, "Monat"); $j = substr($value, 0, 4); $m = substr($value, 4, 2); print ""; $xmlExtractor->extractElement(InputExtractor::EC_CTN, $elem, $value, $attrs); self::assert($elem, "Krankenversicherung"); print ""; $xmlExtractor->extractElement(InputExtractor::EC_CTN, $elem, $value, $attrs); self::assert($elem, "Rentenversicherung"); print ""; $xmlExtractor->extractElement(InputExtractor::EC_CTN, $elem, $value, $attrs); self::assert($elem, "U1"); print ""; $xmlExtractor->extractElement(InputExtractor::EC_CTN, $elem, $value, $attrs); self::assert($elem, "U2"); print ""; $xmlExtractor->extractElement(InputExtractor::EC_CTN, $elem, $value, $attrs); self::assert($elem, "Inso"); print ""; $xmlExtractor->extractElement(InputExtractor::EC_CTN, $elem, $value, $attrs); self::assert($elem, "Pauschalsteuer"); print ""; $xmlExtractor->extractElement(InputExtractor::EC_CTN, $elem, $value, $attrs); self::assert($elem, "Summe"); print ""; print "
MonatKrankenversicherungRentenversicherung U1U2InsoPauschalsteuerSumme
$m / $j$value$value$value$value$value$value$value
"; } private static function assert($v1, $v2) { if ($v1 != $v2) throw new Exception ("Unexpected XML Tag: $v1"); } }