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 entries- edge_data,- node_data,- demand_dataand- cost_data. If- False(default), a- Networkobject created from this data is returned
 
- Returns
- netNetwork or dict
- The network read from the data. If - return_dictis True, a dict with the raw data is returned.
 
 - See also - xml.etree.ElementTree
- from_xml()
- from_xmlmethod of Edges class
- from_xml()
- from_xmlmethod of Nodes class
- from_xml()
- from_xmlmethod of NetworkCost class