lib/sem4r/ad_group_criterion/criterion.rb in sem4r-0.1.1 vs lib/sem4r/ad_group_criterion/criterion.rb in sem4r-0.1.2
- old
+ new
@@ -43,12 +43,12 @@
def id
@id
end
def self.from_element( ad_group, el )
- xml_type = el.elements["Criterion.Type"].text.strip
- # klass = Module::const_get(type)
- # klass.from_element(ad_group, el)
+ xml_type = el.at_xpath("Criterion.Type").text.strip
+ # klass = Module::const_get(type)
+ # klass.from_element(ad_group, el)
case xml_type
when Keyword
CriterionKeyword.from_element(ad_group, el)
when Placement
CriterionPlacement.from_element(ad_group, el)