### Home Classes Methods

### In Files

- lib/graphviz/xml.rb

### Parent

Object

### Methods

- ::new
- #output

### Files

- AUTHORS
- COPYING
- README.rdoc

### Class/Module Index

Quicksearch

- GraphViz
- GraphViz::Attrs
- GraphViz::Edge
- GraphViz::Elements
- GraphViz::Ext
- GraphViz::FamilyTree
- GraphViz::FamilyTree::Couple
- GraphViz::FamilyTree::Generation
- GraphViz::FamilyTree::Person
- GraphViz::FamilyTree::Sibling
- GraphViz::GraphML
- GraphViz::Math
- GraphViz::Math::CoordinateError
- GraphViz::Math::Matrix
- GraphViz::Math::ValueError
- GraphViz::Node
- GraphViz::Theory
- GraphViz::Types
- GraphViz::Types::Common
- GraphViz::Types::EscString
- GraphViz::Types::GvDouble
- GraphViz::Types::HtmlString
- GraphViz::Types::LblString
- GraphViz::XML
- Constants
- GVUtils
- Hash
- Object
- String

No matching classes.

# GraphViz::XML

### Public Class Methods

new( xFile, *hOpt ) click to toggle source

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

### Public Instance Methods

output( *hOpt ) click to toggle source

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

  - a file name

  - nil, then the output will be printed to STDOUT

  - String, then the output will be returned as a String

- :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

[Validate]

Generated with the Darkfish Rdoc Generator 2.