Class: Peddler::Parsers::XML
- Inherits:
-
Base
- Object
- Base
- Peddler::Parsers::XML
show all
- Defined in:
- lib/peddler/parsers/xml.rb
Instance Attribute Summary
Attributes inherited from Base
#document
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Class Method Details
.xml? ⇒ Boolean
6
7
8
|
# File 'lib/peddler/parsers/xml.rb', line 6
def self.xml?
true
end
|
Instance Method Details
#at_xpath(path) ⇒ Object
15
16
17
|
# File 'lib/peddler/parsers/xml.rb', line 15
def at_xpath(path)
document.at_xpath(add_namespace(path))
end
|
#text_at_xpath(path) ⇒ Object
10
11
12
13
|
# File 'lib/peddler/parsers/xml.rb', line 10
def text_at_xpath(path)
node = at_xpath(path)
node.text if node
end
|
#xpath(path) ⇒ Object
19
20
21
|
# File 'lib/peddler/parsers/xml.rb', line 19
def xpath(path)
document.xpath(add_namespace(path))
end
|