Class: Peddler::Parsers::XML

Inherits:
Base
  • Object
show all
Defined in:
lib/peddler/parsers/xml.rb

Direct Known Subclasses

Collection, Model

Instance Attribute Summary

Attributes inherited from Base

#document

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Peddler::Parsers::Base

Class Method Details

.handle?(type) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/peddler/parsers/xml.rb', line 6

def self.handle?(type)
  type == :xml
end

Instance Method Details

#at_xpath(path) ⇒ Object



10
11
12
# File 'lib/peddler/parsers/xml.rb', line 10

def at_xpath(path)
  document.at_xpath(with_namespace(path))
end

#xpath(path) ⇒ Object



14
15
16
# File 'lib/peddler/parsers/xml.rb', line 14

def xpath(path)
  document.xpath(with_namespace(path))
end