I want to access the nodes, edges and properties of 'xDotGraph' (G.DotGraph) and set those again. Here is Haskell code that prints dot format graph using graphviz:
$ cat example.dot
digraph {
a [type1="", type2=""];
b [type1="", type2=""];
a -> b [label=""];
}
import Data.GraphViz
import Data.Text.IO as T
import qualified Data.Text.Lazy as B
import qualified Data.Text.Lazy.IO as L
import qualified Data.GraphViz.Types.Generalised as G
import Data.GraphViz.Printing
xDotText <- L.readFile "example.xdot"
let xDotGraph = parseDotGraph xDotText :: G.DotGraph String
T.putStrLn $ renderDot $ toDot xDotGraph