module GreenButton
Constants
- UsagePoint
Public Class Methods
load_xml_from_file(path)
click to toggle source
# 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)
click to toggle source
could also load this from the data custodian:feed url = “services.greenbuttondata.org:80/DataCustodian/espi/1_1/resource/RetailCustomer/1/DownloadMyData”
# 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