Converting topology file of a network (.topo file) to .gxml file using igraph in R

Dear all,

Does anybody have a code that can convert topology file of a network (with .topo file extension) to a .gxml file. I would really appreciate any kind of support.

The format of .topo file looks like below:

Source Target Type
miR200 ZEB 2
ZEB miR200 2
ZEB GRHL2 2
GRHL2 ZEB 2
ZEB ZEB 1

And the format of .gxml file is as below:

<?xml version="1.0" encoding="UTF-8"?>

miR200 ZEB GRHL2 true true true true false