All parser events are delegated to SAXDriver
# File lib/xml/saxdriver.rb, line 72 def SAXParser.new(saxdriver, *rest) obj = super(*rest) obj.setDriver(saxdriver) obj end
# File lib/xml/saxdriver.rb, line 78 def initialize(*args) super(*args) @publicId = nil @systemId = nil if self.respond_to?(:setParamEntityParsing) self.setParamEntityParsing(PARAM_ENTITY_PARSING_UNLESS_STANDALONE) end end
# File lib/xml/saxdriver.rb, line 123 def character(data) @saxdriver.character(data) end
# File lib/xml/saxdriver.rb, line 139 def comment(data) end
# File lib/xml/saxdriver.rb, line 119 def endElement(name) @saxdriver.endElement(name) end
# File lib/xml/saxdriver.rb, line 142 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
# File lib/xml/saxdriver.rb, line 111 def getColumnNumber self.column end
# File lib/xml/saxdriver.rb, line 107 def getLineNumber self.line end
# File lib/xml/saxdriver.rb, line 99 def getPublicId @publicId end
# File lib/xml/saxdriver.rb, line 103 def getSystemId @systemId end
# File lib/xml/saxdriver.rb, line 131 def notationDecl(name, base, sysid, pubid) @saxdriver.notationDecl(name, base, sysid, pubid) end
# File lib/xml/saxdriver.rb, line 91 def parse(inputSource) @systemId = inputSource.getSystemId @saxdriver.pushLocator(self) setBase(@systemId) super(inputSource.getByteStream.read) @saxdriver.popLocator end
# File lib/xml/saxdriver.rb, line 127 def processingInstruction(target, data) @saxdriver.processingInstruction(target, data) end
# File lib/xml/saxdriver.rb, line 87 def setDriver(saxdriver) @saxdriver = saxdriver end
# File lib/xml/saxdriver.rb, line 115 def startElement(name, attr) @saxdriver.startElement(name, attr) end
# File lib/xml/saxdriver.rb, line 135 def unparsedEntityDecl(name, base, sysid, pubid, notation) @saxdriver.unparsedEntityDecl(name, base, sysid, pubid, notation) end