sumolib.files.additional
1# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo 2# Copyright (C) 2008-2026 German Aerospace Center (DLR) and others. 3# This program and the accompanying materials are made available under the 4# terms of the Eclipse Public License 2.0 which is available at 5# https://www.eclipse.org/legal/epl-2.0/ 6# This Source Code may also be made available under the following Secondary 7# Licenses when the conditions for such availability set forth in the Eclipse 8# Public License 2.0 are satisfied: GNU General Public License, version 2 9# or later which is available at 10# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html 11# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later 12 13# @file additional.py 14# @author Jakob Erdmann 15# @author Michael Behrisch 16# @date 2013-05-06 17 18 19def write(name, elements): 20 fdo = open(name, "w") 21 fdo.write( 22 '<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' + 23 'xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">\n') 24 for e in elements: 25 fdo.write("%s\n" % e.toXML()) 26 fdo.write("</additional>\n") 27 fdo.close()
def
write(name, elements):
20def write(name, elements): 21 fdo = open(name, "w") 22 fdo.write( 23 '<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' + 24 'xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">\n') 25 for e in elements: 26 fdo.write("%s\n" % e.toXML()) 27 fdo.write("</additional>\n") 28 fdo.close()