Network.from_xml¶
- classmethod Network.from_xml(file: str, return_dict: bool = False, **kwargs) paminco.net.network.Network [source]¶
Read network from
XML
.- Parameters
- datastr, file, ElementTree or Element
- Initialize object from xml file by passing
filename as str,
file object that contains XML data,
the XML ElementTree,
or the root Element of the ElementTree.
- return_dictbool, default=False,
If
True
, the data is returned as a dict with entriesedge_data
,node_data
,demand_data
andcost_data
. IfFalse
(default), aNetwork
object created from this data is returned
- Returns
- netNetwork or dict
The network read from the data. If
return_dict
is True, a dict with the raw data is returned.
See also
xml.etree.ElementTree
from_xml()
from_xml
method of Edges classfrom_xml()
from_xml
method of Nodes classfrom_xml()
from_xml
method of NetworkCost class