XML error when running command

After installin Graphviz 7.1.0 exe on my windows system. I ran these commands
echo ‘digraph { a-> b }’ | dot -Tsvg > output.svg
explorer file:///C:/Temp/output.svg

I am getting the error as
“This XML file does not appear to have any style information associated with it. The document tree is shown below.”

The command echo 'digraph { a-> b }' is a Linux OS command and does not work on Windows. OK, it works, but it does not do anything useful.
And because dot received no useful input, it created no useful output.

Try this:

  • use a text editor like notepad, emacs, vim, (not word!) and create a file that looks like this:
digraph X { 
  • save it in some findable directory
  • name it something like myFirst.gv
  • using the cmd window (or powershell) type
    dot -Tsvg myFirst.gv >myFirst.svg

Should work!

Thank you so much… This worked.Appreciate your help