import_pnml

Function import_pnml 

Source
pub fn import_pnml<T>(
    reader: &mut Reader<T>,
) -> Result<PetriNet, PNMLParseError>
where T: BufRead,
Expand description

Import a PNML file from the given XML reader (quick_xml::Reader)

Also consider using PetriNet::import_pnml for importing from a filepath directly for convenience.

Note, that this implementation (at least currently) is a best-effort parser for the basic types of Petri nets encountered commonly in Process Mining. In particular, the following Petri net features are implemented:

  • Places, Transitions
  • Silent transitions (toolspecific tag)
  • Basics arcs (i.e., not inhibitor arcs, etc.)
  • Arc weights
  • A single initial marking
  • Multiple final markings

Also see import_pnml_reader for an alternative version of this function, which takes a (standard) buffered reader implementing std::io::BufRead instead