lib/azure/table/serialization.rb in azure-0.7.0 vs lib/azure/table/serialization.rb in azure-0.7.1
- old
+ new
@@ -32,11 +32,11 @@
'xmlns:d' => 'http://schemas.microsoft.com/ado/2007/08/dataservices'
}
xml.entry entry_namespaces do |entry|
id ? entry.id(id): entry.id
- entry.updated Time.now.xmlschema
+ entry.updated Time.now.xmlschema
entry.title
entry.author do |author|
author.name
end
hash_to_content_xml(hash, entry)
@@ -72,13 +72,13 @@
def self.entries_from_feed_xml(xml)
xml = slopify(xml)
expect_node('feed', xml)
return nil unless (xml > 'entry').any?
-
+
results = []
-
+
if (xml > 'entry').count == 0
results.push hash_from_entry_xml((xml > 'entry'))
else
(xml > 'entry').each do |entry|
results.push hash_from_entry_xml(entry)
@@ -92,10 +92,10 @@
xml = slopify(xml)
expect_node('entry', xml)
result = {}
result[:etag] = xml['etag']
result[:updated] = Time.parse((xml > 'updated').text) if (xml > 'updated').any?
- properties = {}
+ properties = {}
if (xml > 'content').any?
(xml > 'content').first.first_element_child.element_children.each do |prop|
properties[prop.name] = prop.text != '' ? Azure::Table::EdmType.unserialize_query_value(prop.text, prop['m:type']) : prop['null'] ? nil : ''
end
end
\ No newline at end of file