Class: XMLRPC::XMLWriter::XMLParser
- Inherits:
-
Object
- Object
- XMLRPC::XMLWriter::XMLParser
- Includes:
- Element
- Defined in:
- lib/xmlrpc/create.rb
Instance Method Summary collapse
- #document(*params) ⇒ Object
- #document_to_str(doc) ⇒ Object
- #element(name, attrs, *children) ⇒ Object
-
#initialize ⇒ XMLParser
constructor
A new instance of XMLParser.
- #pi(name, *params) ⇒ Object
- #text(txt) ⇒ Object
Methods included from Element
Constructor Details
#initialize ⇒ XMLParser
Returns a new instance of XMLParser.
64 65 66 |
# File 'lib/xmlrpc/create.rb', line 64 def initialize require "xmltreebuilder" end |
Instance Method Details
#document(*params) ⇒ Object
72 73 74 |
# File 'lib/xmlrpc/create.rb', line 72 def document(*params) XML::SimpleTree::Document.new(*params) end |
#document_to_str(doc) ⇒ Object
68 69 70 |
# File 'lib/xmlrpc/create.rb', line 68 def document_to_str(doc) doc.to_s end |
#element(name, attrs, *children) ⇒ Object
80 81 82 |
# File 'lib/xmlrpc/create.rb', line 80 def element(name, attrs, *children) XML::SimpleTree::Element.new(name, attrs, *children) end |
#pi(name, *params) ⇒ Object
76 77 78 |
# File 'lib/xmlrpc/create.rb', line 76 def pi(name, *params) XML::SimpleTree::ProcessingInstruction.new(name, *params) end |
#text(txt) ⇒ Object
84 85 86 |
# File 'lib/xmlrpc/create.rb', line 84 def text(txt) XML::SimpleTree::Text.new(txt) end |