Module: GreenButton
- Defined in:
- lib/greenbutton.rb
Defined Under Namespace
Classes: Parser
Constant Summary collapse
- UsagePoint =
GreenButtonClasses::UsagePoint
Class Method Summary collapse
- .load_xml_from_file(path) ⇒ Object
-
.load_xml_from_web(url) ⇒ Object
could also load this from the data custodian:feed url = “services.greenbuttondata.org:80/DataCustodian/espi/1_1/resource/RetailCustomer/1/DownloadMyData”.
Class Method Details
.load_xml_from_file(path) ⇒ Object
16 17 18 19 20 |
# File 'lib/greenbutton.rb', line 16 def self.load_xml_from_file(path) xml_file = Nokogiri.XML(File.open(path, 'rb')) xml_file.remove_namespaces! Parser.new(xml_file) end |
.load_xml_from_web(url) ⇒ Object
could also load this from the data custodian:feed url = “services.greenbuttondata.org:80/DataCustodian/espi/1_1/resource/RetailCustomer/1/DownloadMyData”
10 11 12 13 14 |
# File 'lib/greenbutton.rb', line 10 def self.load_xml_from_web(url) xml_file = Nokogiri.XML(open(url)) xml_file.remove_namespaces! Parser.new(xml_file) end |