class XML::Parser::SAXDriver::SAXParser
All parser events are delegated to SAXDriver
Public Class Methods
Source
# File lib/xml/saxdriver.rb, line 71 def SAXParser.new(saxdriver, *rest) obj = super(*rest) obj.setDriver(saxdriver) obj end
Calls superclass method
Source
# File lib/xml/saxdriver.rb, line 77 def initialize(*args) super(*args) @publicId = nil @systemId = nil if self.respond_to?(:setParamEntityParsing) self.setParamEntityParsing(PARAM_ENTITY_PARSING_UNLESS_STANDALONE) end end
Calls superclass method
Public Instance Methods
Source
# File lib/xml/saxdriver.rb, line 122 def character(data) @saxdriver.character(data) end
Source
# File lib/xml/saxdriver.rb, line 118 def endElement(name) @saxdriver.endElement(name) end
Source
# File lib/xml/saxdriver.rb, line 141 def externalEntityRef(context, base, systemId, publicId) inputSource = @saxdriver.xmlOpen(base, systemId, publicId) encoding = inputSource.getEncoding if encoding parser = SAXParser.new(@saxdriver, self, context, encoding) else parser = SAXParser.new(@saxdriver, self, context) end parser.parse(inputSource) parser.done end
Source
# File lib/xml/saxdriver.rb, line 130 def notationDecl(name, base, sysid, pubid) @saxdriver.notationDecl(name, base, sysid, pubid) end
Source
# File lib/xml/saxdriver.rb, line 90 def parse(inputSource) @systemId = inputSource.getSystemId @saxdriver.pushLocator(self) setBase(@systemId) super(inputSource.getByteStream.read) @saxdriver.popLocator end
Calls superclass method
Source
# File lib/xml/saxdriver.rb, line 126 def processingInstruction(target, data) @saxdriver.processingInstruction(target, data) end
Source
# File lib/xml/saxdriver.rb, line 86 def setDriver(saxdriver) @saxdriver = saxdriver end
Source
# File lib/xml/saxdriver.rb, line 114 def startElement(name, attr) @saxdriver.startElement(name, attr) end
Source
# File lib/xml/saxdriver.rb, line 134 def unparsedEntityDecl(name, base, sysid, pubid, notation) @saxdriver.unparsedEntityDecl(name, base, sysid, pubid, notation) end