sumolib.xml
index
/home/delphi/gcc/sumo/tools/sumolib/xml/__init__.py

# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
# Copyright (C) 2011-2025 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the Eclipse
# Public License 2.0 are satisfied: GNU General Public License, version 2
# or later which is available at
https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later

 
Package Contents
       
parsing
xsd

 
Functions
       
buildHeader(script=None, root=None, schemaPath=None, rootAttrs='', options=None, includeXMLDeclaration=False)
Builds an XML header with schema information and a comment on how the file has been generated
(script name, arguments and datetime).
If script name is not given, it is determined from the command line call.
If root is not given, no root element is printed (and thus no schema).
If schemaPath is not given, it is derived from the root element.
If rootAttrs is given as a string, it can be used to add further attributes to the root element.
If rootAttrs is set to None, the schema related attributes are not printed.
insertOptionsHeader(filename, options)
Inserts a comment header with the options used to call the script into an existing file.
iskeyword = __contains__(...) method of builtins.frozenset instance
x.__contains__(y) <==> y in x.
reduce(...)
reduce(function, iterable[, initial]) -> value
 
Apply a function of two arguments cumulatively to the items of a sequence
or iterable, from left to right, so as to reduce the iterable to a single
value.  For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates
((((1+2)+3)+4)+5).  If initial is present, it is placed before the items
of the iterable in the calculation, and serves as a default when the
iterable is empty.
writeHeader(outf, script=None, root=None, schemaPath=None, rootAttrs='', options=None, includeXMLDeclaration=True)
Writes an XML header with schema information and a comment on how the file has been generated
(script name, arguments and datetime). Please use this as first call whenever you open a
SUMO related XML file for writing from your script.
If script name is not given, it is determined from the command line call.
If root is not given, no root element is printed (and thus no schema).
If schemaPath is not given, it is derived from the root element.
If rootAttrs is given as a string, it can be used to add further attributes to the root element.
If rootAttrs is set to None, the schema related attributes are not printed.

 
Data
        DEFAULT_ATTR_CONVERSIONS = {'angle': <class 'float'>, 'contPos': <class 'float'>, 'endOffset': <class 'float'>, 'endPos': <class 'float'>, 'freq': <class 'float'>, 'fromLane': <class 'int'>, 'index': <class 'int'>, 'lat': <class 'float'>, 'length': <class 'float'>, 'linkIndex': <class 'int'>, ...}