package Ġcom . je jk ing . kos mp ar ser . util Ċ Ċ import Ġcom . je jk ing . kos mp ar ser . io . as Flow Ċ import Ġcom . je jk ing . kos mp ar ser . xml . Characters Ċ import Ġcom . je jk ing . kos mp ar ser . xml . Xml Flow Mapper . to Parse Events Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . flow . collect Ċ import Ġkotlinx . coroutines . flow . filter Ċ import Ġkotlinx . coroutines . run Blocking Ċ Ċ @ Experimental Cor outines Api Ċ object ĠDump File Parse Events Ġ{ ĊĊĠ Ġ@ Jvm Static ĊĠ Ġfun Ġmain ( args : ĠArray < String >) Ġ{ ĊĠĠĠ Ġxml Parse Events () ĊĠ Ġ} ĊĊĠ Ġfun Ġxml Parse Events () Ġ{ ĊĠĠĠ Ġval Ġtest FilePath Ġ= ĠgetPath (" test 1 . osm ") ĊĠĠĠ Ġval Ġfile Channel Ġ= Ġopen File Channel ( test FilePath ) ĊĊĠĠĠ Ġrun Blocking Ġ{ ĊĠĠĠĠĠ Ġto Parse Events ( file Channel . as Flow ()) ĊĠĠĠĠĠĠĠ Ġ. filter Ġ{ Ġ!( it Ġis ĠChar acters Ġ&& Ġit . text . isBlank ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ. collect Ġ{ Ġprintln ( it ) Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ