Class: XMLRPC::XMLParser::XMLScanStreamParser::XMLScanParser
- Inherits:
-
Object
- Object
- XMLRPC::XMLParser::XMLScanStreamParser::XMLScanParser
show all
- Includes:
- StreamParserMixin
- Defined in:
- lib/xmlrpc/parser.rb
Constant Summary
collapse
- Entities =
{
"lt" => "<",
"gt" => ">",
"amp" => "&",
"quot" => '"',
"apos" => "'"
}
Instance Attribute Summary
#fault, #method_name, #params
Instance Method Summary
collapse
#character, #endElement, #initialize, #startElement
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*a) ⇒ Object
806
807
|
# File 'lib/xmlrpc/parser.rb', line 806
def method_missing(*a)
end
|
Instance Method Details
#on_cdata(str) ⇒ Object
785
786
787
|
# File 'lib/xmlrpc/parser.rb', line 785
def on_cdata(str)
character(str)
end
|
#on_chardata(str) ⇒ Object
781
782
783
|
# File 'lib/xmlrpc/parser.rb', line 781
def on_chardata(str)
character(str)
end
|
#on_charref(code) ⇒ Object
798
799
800
|
# File 'lib/xmlrpc/parser.rb', line 798
def on_charref(code)
character(code.chr)
end
|
#on_charref_hex(code) ⇒ Object
802
803
804
|
# File 'lib/xmlrpc/parser.rb', line 802
def on_charref_hex(code)
character(code.chr)
end
|
#on_entityref(ent) ⇒ Object
789
790
791
792
793
794
795
796
|
# File 'lib/xmlrpc/parser.rb', line 789
def on_entityref(ent)
str = Entities[ent]
if str
character(str)
else
raise "unknown entity"
end
end
|
#on_stag_end(name) ⇒ Object
774
|
# File 'lib/xmlrpc/parser.rb', line 774
def on_stag_end(name); end
|
#on_stag_end_empty(name) ⇒ Object
776
777
778
779
|
# File 'lib/xmlrpc/parser.rb', line 776
def on_stag_end_empty(name)
startElement(name)
endElement(name)
end
|
#parse(str) ⇒ Object
766
767
768
769
|
# File 'lib/xmlrpc/parser.rb', line 766
def parse(str)
parser = XMLScan::XMLParser.new(self)
parser.parse(str)
end
|