Module: Cheri::Xml

Defined in:
lib/cheri/builder/xml/types.rb,
lib/cheri/builder/xml/common.rb,
lib/cheri/builder/xml/element.rb,
lib/cheri/builder/xml/connecter.rb

Defined Under Namespace

Modules: XmlBuilder, XmlElement Classes: BuilderException, CommentElem, Elem, EmptyElem, EscElem, Namespace, ProcElem, TextElem, XmlException, XmlRoot

Constant Summary collapse

Types =
Hash[
  :xml => XmlRoot,
  :text! => TextElem,
  :t! => TextElem,
  :esc! => EscElem,
  :proc! => ProcElem,
  :comment! =>CommentElem
]
Aliases =
Hash[
  :inspect! => :inpect,
  :class! => :class
]
VERSION =
Cheri::VERSION
XmlConnecter =
Cheri::Builder::TypeConnecter.new do

  type XmlElement do
    connect XmlElement
    connect Cheri::Builder::Content
  end

  type XmlRoot do
    connect XmlElement
  end

  type TextElem do
    connect XmlElement
    connect Cheri::Builder::Content
    connect Object  
  end
  
  type Namespace do
    connect XmlElement do |namespace,elem|
      elem.ns ||= namespace.__prefix__
    end  
  end
end