Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix: Current Weather Example

  + Current Weather Example used the wrong specified namespace

  + Multi-Street Address has the output but does not currently work
  • Loading branch information...
commit 4c32190e6883e6547355ef1c42badea321df6646 1 parent 8d6fb1a
Frank Webber authored
Showing with 15 additions and 1 deletion.
  1. +1 −1  examples/current_weather.rb
  2. +14 −0 examples/multi_street_address.rb
View
2  examples/current_weather.rb
@@ -7,7 +7,7 @@ class CurrentWeather
include HappyMapper
tag 'ob'
- namespace 'aws'
+ namespace 'http://www.aws.com/aws'
element :temperature, Integer, :tag => 'temp'
element :feels_like, Integer, :tag => 'feels-like'
element :current_condition, String, :tag => 'current-condition', :attributes => {:icon => String}
View
14 examples/multi_street_address.rb
@@ -12,4 +12,18 @@ class MultiStreetAddress
element :state_or_providence, String, :tag => "stateOfProvidence"
element :zip, String
element :country, String
+end
+
+MultiStreetAddress.parse(file_contents).each do |multi|
+
+ puts "Street Address:"
+
+ multi.street_address.each do |street|
+ puts street
+ end
+
+ puts "City: #{multi.city}"
+ puts "State/Province: #{multi.state_or_province}"
+ puts "Zip: #{multi.zip}"
+ puts "Country: #{multi.country}"
end
Please sign in to comment.
Something went wrong with that request. Please try again.