Method: Azure::Service::Serialization::ClassMethods#slopify

Defined in:
lib/azure/service/serialization.rb

#slopify(xml) ⇒ Object



221
222
223
224
225
226
# File 'lib/azure/service/serialization.rb', line 221

def slopify(xml)
  node = (xml.is_a? String) ? Nokogiri.Slop(xml).root : xml
  node.slop! if node.is_a? Nokogiri::XML::Document unless node.respond_to? :method_missing
  node = node.root if node.is_a? Nokogiri::XML::Document
  node
end