1# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
2# Copyright (C) 2008-2019 German Aerospace Center (DLR) and others.
3# This program and the accompanying materials
4# are made available under the terms of the Eclipse Public License v2.0
5# which accompanies this distribution, and is available at
6# http://www.eclipse.org/legal/epl-v20.html
7# SPDX-License-Identifier: EPL-2.0
8
9# @file    additional.py
10# @author  Jakob Erdmann
11# @author  Michael Behrisch
12# @date    2013-05-06
13# @version $Id$
14
15
16def write(name, elements):
17    fdo = open(name, "w")
18    fdo.write(
19        '<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
20        'xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">\n')
21    for e in elements:
22        fdo.write("%s\n" % e.toXML())
23    fdo.write("</additional>\n")
24    fdo.close()
25