Example #1
0
    if (false === $xmlWriter->startElement('map')) {
        throw new Exception('Can not start map element');
    }
    $xmlWriter->writeAttributeNS('xmlns', 'xsi', null, 'https://raw.githubusercontent.com/jeschkec/GozintograPHP/master/src/main/ressources/schema/gozintographp.xsd');
} catch (Exception $exception) {
    fwrite(STDERR, $exception->getMessage());
    exit(3);
}
/**
 *
 */
foreach ($files as $File) {
    try {
        $gozintographp = new Application($File);
        $gozintographp->read();
        $gozintographp->parse();
        $gozintographp->dump(new \XMLWriter());
    } catch (Exception $exception) {
        fwrite(STDERR, $exception->getMessage());
        exit(3);
    }
    $xmlWriter->writeRaw($gozintographp->getTokenAsXml());
}
try {
    /**
     *  @throws  Exception
     */
    if (false === $xmlWriter->endElement()) {
        throw new Exception('Can not end XMLWriter memory');
    }
} catch (Exception $exception) {