Module | XMLHelper
In: | lib/facets/more/xmlhelper.rb

# XMLHelper

XMLHelper is a utility module which provides methods the ease the creation of XML markup.

## Usage

      x = XMLHelper
      puts x.element( :a, x.element( :b, "X" ) )

produces

      <a><b>X</b></a>

### Methods

attlist! cdata comment doctype! document element element! entity! instruct instruction new notation! pi text xml

### Public Instance methods

attlist!( *args )

ATTLIST DTD declaration.

cdata( data )

CData.

comment( remark )

Comment.

doctype!( *args )

DOCTYPE DTD declaration.

document( options )

Empty XML document.

element( tag, body=nil, atts={} )

Element.

element!( *args )

ELEMENT DTD declaration.

entity!( *args )

ENTITY DTD declaration.

instruct( tag, *args )

Proccessing instruction.

instruction( tag, *args )

Alias for instruct

new( options )

Alias for document

notation!( *args )

NOTATION DTD declaration.

pi( tag, *args )

Alias for instruct

text( str )

Text.

xml( version=nil, encoding=nil )

XML declaration.

[Validate]