<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: GraphViz code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 00:11:40 GMT</pubDate>
    <description>DZone Snippets: GraphViz code</description>
    <item>
      <title>Geni2gedcom</title>
      <link>http://snippets.dzone.com/posts/show/4081</link>
      <description>Tansform gedcom-XML output of geni.com to dot file for graphviz&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?xml version='1.0' ?&gt;&lt;br /&gt;&lt;xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'&gt;&lt;br /&gt;&lt;xsl:output method='text'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:template match="GEDCOM"&gt;&lt;br /&gt;        digraph &amp;apos;G&amp;apos; {&lt;br /&gt;        &lt;xsl:apply-templates select="FamilyRec"/&gt;&lt;br /&gt;        &lt;xsl:apply-templates select="IndividualRec"/&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:template match="IndividualRec"&gt;&lt;br /&gt;        &lt;xsl:value-of select="@Id"/&gt;[ label=&amp;quot;&lt;xsl:value-of select="IndivNam&lt;br /&gt;e/GivenName"/&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;xsl:value-of select="IndivName/SurName"/&gt; &amp;&lt;br /&gt;quot;];&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:template match="FamilyRec"&gt;&lt;br /&gt;        &lt;xsl:variable name="famId"&gt;&lt;xsl:value-of select="@Id"/&gt;&lt;/xsl:variable&gt;&lt;br /&gt;        &lt;xsl:if test="HusbFath"&gt;&lt;br /&gt;                &lt;xsl:value-of select="HusbFath/Link/@Ref"/&gt;-&amp;gt;&lt;xsl:value-of se&lt;br /&gt;lect="$famId"/&gt;;&lt;br /&gt;        &lt;/xsl:if&gt;&lt;br /&gt;&lt;br /&gt;        &lt;xsl:if test="WifeMoth"&gt;&lt;br /&gt;                &lt;xsl:value-of select="WifeMoth/Link/@Ref"/&gt;-&amp;gt;&lt;xsl:value-of se&lt;br /&gt;lect="$famId"/&gt;;&lt;br /&gt;        &lt;/xsl:if&gt;&lt;br /&gt;&lt;br /&gt;        &lt;xsl:for-each select="Child"&gt;&lt;br /&gt;                &lt;xsl:value-of select="$famId"/&gt;-&amp;gt;&lt;xsl:value-of select="Link/@&lt;br /&gt;Ref"/&gt;;&lt;br /&gt;        &lt;/xsl:for-each&gt;&lt;br /&gt;&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 31 May 2007 08:22:10 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4081</guid>
      <author>lindenb (Pierre)</author>
    </item>
    <item>
      <title>Create Graphiz image from Dot file using DotNet</title>
      <link>http://snippets.dzone.com/posts/show/2601</link>
      <description>This is from http://vv.cs.byu.edu/cs312-003/archives/2005/01/graph_visualiza.html.  Go there for more info.&lt;br /&gt;&lt;code&gt;&lt;br /&gt; private void button2_Click(object sender, System.EventArgs e) {&lt;br /&gt;&lt;br /&gt;string strCmdLine1 = "-Tsvg -o c:\\tmp\\foo.xml c:\\tmp\\ER.dot";&lt;br /&gt;string strCmdLine2 = "-Tsvg -o c:\\tmp\\foo.xml c:\\tmp\\Heawood.dot";&lt;br /&gt;System.Diagnostics.Process p = new System.Diagnostics.Process();&lt;br /&gt;&lt;br /&gt;p.StartInfo.FileName = "\"C:\\Program Files\\ATT\\Graphviz\\bin\\dot.exe\"";&lt;br /&gt;p.StartInfo.CreateNoWindow = true;&lt;br /&gt;p.StartInfo.UseShellExecute = false;&lt;br /&gt;if (graphIndex == 0)&lt;br /&gt;p.StartInfo.Arguments = strCmdLine2;&lt;br /&gt;else&lt;br /&gt;p.StartInfo.Arguments = strCmdLine1;&lt;br /&gt;&lt;br /&gt;p.Start();&lt;br /&gt;p.WaitForExit();&lt;br /&gt;&lt;br /&gt;axSVGCtl1.reload();&lt;br /&gt;graphIndex = (graphIndex + 1) % 2;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 16 Sep 2006 03:07:52 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2601</guid>
      <author>MattScilipoti (Matt Scilipoti)</author>
    </item>
  </channel>
</rss>
