Class: Aliyun::OSS::Parsing::XmlParser

Inherits:
Hash show all
Includes:
Typecasting
Defined in:
lib/aliyun/oss/parsing.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Typecasting

#typecast, #typecast_hash

Methods inherited from Hash

#extractable_options?, #to_normalized_options, #to_normalized_options!, #to_query_string

Constructor Details

#initialize(body) ⇒ XmlParser

Returns a new instance of XmlParser.



53
54
55
56
57
58
59
60
# File 'lib/aliyun/oss/parsing.rb', line 53

def initialize(body)
  @body = body
  unless body.strip.empty?
    parse
    set_root
    typecast_xml_in
  end
end

Class Attribute Details

.parsing_libraryObject

Returns the value of attribute parsing_library.



48
49
50
# File 'lib/aliyun/oss/parsing.rb', line 48

def parsing_library
  @parsing_library
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



51
52
53
# File 'lib/aliyun/oss/parsing.rb', line 51

def body
  @body
end

#rootObject (readonly)

Returns the value of attribute root.



51
52
53
# File 'lib/aliyun/oss/parsing.rb', line 51

def root
  @root
end

#xml_inObject (readonly)

Returns the value of attribute xml_in.



51
52
53
# File 'lib/aliyun/oss/parsing.rb', line 51

def xml_in
  @xml_in
end