Module: DataMapper::Serializer::XML

### Home Classes Methods

### In Files

- lib/dm-serializer/xml.rb
- lib/dm-serializer/xml/libxml.rb
- lib/dm-serializer/xml/nokogiri.rb
- lib/dm-serializer/xml/rexml.rb

### Namespace

- MODULE DataMapper::Serializer::XML::LibXML
- MODULE DataMapper::Serializer::XML::Nokogiri
- MODULE DataMapper::Serializer::XML::REXML

### Methods

- ::serializer
- ::serializer=

### Files

- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- DataMapper
- DataMapper::Collection
- DataMapper::Serializer
- DataMapper::Serializer::Collection
- DataMapper::Serializer::Collection::ToYaml
- DataMapper::Serializer::ValidationErrors
- DataMapper::Serializer::ValidationErrors::ToCsv
- DataMapper::Serializer::ValidationErrors::ToJson
- DataMapper::Serializer::ValidationErrors::ToXml
- DataMapper::Serializer::ValidationErrors::ToYaml
- DataMapper::Serializer::XML
- DataMapper::Serializer::XML::LibXML
- DataMapper::Serializer::XML::Nokogiri
- DataMapper::Serializer::XML::REXML
- DataMapper::Validations
- DataMapper::Validations::ValidationErrors
- Object

No matching classes.

# DataMapper::Serializer::XML

### Constants

SERIALIZERS

  The supported XML Serializers

### Public Class Methods

serializer() click to toggle source

The current XML Serializer.

@return [Module]

    The module within {DataMapper::Serialize::XML}.

@since 1.1.0

    # File lib/dm-serializer/xml.rb, line 19
    def self.serializer
      @serializer
    end

serializer=(name) click to toggle source

Sets the XML Serializer to use.

@param [Symbol] name

    The name of the serializer to use. Must be either `:libxml`,
    `:nokogiri` or `:rexml`.

@return [Module]

    The module within {DataMapper::Serialize::XML}.

@since 1.1.0

    # File lib/dm-serializer/xml.rb, line 35
    def self.serializer=(name)
      serializer_const = SERIALIZERS[name]

      unless serializer_const
        raise(ArgumentError,"unsupported XML Serializer #{name}")
      end

      require "dm-serializer/xml/#{name}"
      @serializer = const_get(serializer_const)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.