Create a graph from a XML file
In:
xFile : XML File
*hOpt : Graph options
# File lib/graphviz/xml.rb, line 59 def initialize( xFile, *hOpt ) @xNodeName = "00000" @bShowText = true @bShowAttrs = true if hOpt.nil? == false and hOpt[0].nil? == false hOpt[0].each do |xKey, xValue| case xKey.to_s when "text" @bShowText = xValue hOpt[0].delete( xKey ) when "attrs" @bShowAttrs = xValue hOpt[0].delete( xKey ) end end end @oReXML = REXML::Document::new( File::new( xFile ) ) @oGraph = GraphViz::new( "XML", *hOpt ) _init( @oReXML.root() ) end
Generate the graph
Options :
:output : Output format (Constants::FORMATS)
:file : Output file name
:use : Program to use (Constants::PROGRAMS)
:path : Program PATH
:<format> => <file> : <file> can be
:errors : DOT error level (default 1)
0 = Error + Warning
1 = Error
2 = none
# File lib/graphviz/xml.rb, line 46 def output( *hOpt ) @oGraph.output( *hOpt ) end
Generated with the Darkfish Rdoc Generator 2.