Class: XMLRPC::XMLWriter::Simple (Ruby 2.2.2)
Description: Class : XMLRPC::XMLWriter::Simple - Ruby 2.2.2

- Home
- Core 2.2.2
- Std-lib 2.2.2
- Downloads

Support for the Ruby 2.2 series has ended. See here for reference.

### Home Classes Methods

### In Files

- xmlrpc/create.rb

### Parent

XMLRPC::XMLWriter::Abstract

### Methods

- #document
- #document_to_str
- #element
- #pi
- #text

### Class/Module Index

Quicksearch

- NQXML
- NQXML::Node
- XMLRPC
- XMLRPC::Base64
- XMLRPC::BasicServer
- XMLRPC::CGIServer
- XMLRPC::Client
- XMLRPC::Client::Proxy
- XMLRPC::Config
- XMLRPC::Convert
- XMLRPC::Create
- XMLRPC::DateTime
- XMLRPC::FaultException
- XMLRPC::Marshal
- XMLRPC::Marshallable
- XMLRPC::ModRubyServer
- XMLRPC::ParseContentType
- XMLRPC::ParserWriterChooseMixin
- XMLRPC::Server
- XMLRPC::Service
- XMLRPC::Service::BasicInterface
- XMLRPC::Service::Interface
- XMLRPC::Service::PublicInstanceMethodsInterface
- XMLRPC::WEBrickServlet
- XMLRPC::XMLParser
- XMLRPC::XMLParser::AbstractStreamParser
- XMLRPC::XMLParser::AbstractTreeParser
- XMLRPC::XMLParser::LibXMLStreamParser
- XMLRPC::XMLParser::LibXMLStreamParser::LibXMLStreamListener
- XMLRPC::XMLParser::NQXMLParser
- XMLRPC::XMLParser::NQXMLStreamParser
- XMLRPC::XMLParser::NQXMLStreamParser::XMLRPCParser
- XMLRPC::XMLParser::NQXMLTreeParser
- XMLRPC::XMLParser::REXMLStreamParser
- XMLRPC::XMLParser::REXMLStreamParser::StreamListener
- XMLRPC::XMLParser::StreamParserMixin
- XMLRPC::XMLParser::XMLParser
- XMLRPC::XMLParser::XMLScanStreamParser
- XMLRPC::XMLParser::XMLScanStreamParser::XMLScanParser
- XMLRPC::XMLParser::XMLStreamParser
- XMLRPC::XMLParser::XMLTreeParser
- XMLRPC::XMLWriter
- XMLRPC::XMLWriter::Abstract
- XMLRPC::XMLWriter::Simple
- XMLRPC::XMLWriter::XMLParser

No matching classes.

# XMLRPC::XMLWriter::Simple

### Public Instance Methods

document(*params) click to toggle source

                   # File xmlrpc/create.rb, line 31
    def document(*params)
      params.join("")
    end

document_to_str(doc) click to toggle source

                   # File xmlrpc/create.rb, line 27
    def document_to_str(doc)
      doc
    end

element(name, attrs, *children) click to toggle source

                   # File xmlrpc/create.rb, line 39
    def element(name, attrs, *children)
      raise "attributes not yet implemented" unless attrs.nil?
      if children.empty?
        "<#{name}/>"
      else
        "<#{name}>" + children.join("") + "</#{name}>"
      end
    end

pi(name, *params) click to toggle source

                   # File xmlrpc/create.rb, line 35
    def pi(name, *params)
      "<?#{name} " + params.join(" ") + " ?>"
    end

text(txt) click to toggle source

                   # File xmlrpc/create.rb, line 48
    def text(txt)
      cleaned = txt.dup
      cleaned.gsub!(/&/, '&amp;')
      cleaned.gsub!(/</, '&lt;')
      cleaned.gsub!(/>/, '&gt;')
      cleaned
    end