class XML::Parser::SAXDriver::SAXParser

All parser events are delegated to SAXDriver

Public Class Methods

new(saxdriver, *rest) click to toggle source
Calls superclass method
# File lib/xml/saxdriver.rb, line 71
def SAXParser.new(saxdriver, *rest)
  obj = super(*rest)
  obj.setDriver(saxdriver)
  obj
end
new(*args) click to toggle source
Calls superclass method
# 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

Public Instance Methods

character(data) click to toggle source
# File lib/xml/saxdriver.rb, line 122
def character(data)
  @saxdriver.character(data)
end
comment(data) click to toggle source
# File lib/xml/saxdriver.rb, line 138
def comment(data)
end
endElement(name) click to toggle source
# File lib/xml/saxdriver.rb, line 118
def endElement(name)
  @saxdriver.endElement(name)
end
externalEntityRef(context, base, systemId, publicId) click to toggle 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
getColumnNumber() click to toggle source
# File lib/xml/saxdriver.rb, line 110
def getColumnNumber
  self.column
end
getLineNumber() click to toggle source
# File lib/xml/saxdriver.rb, line 106
def getLineNumber
  self.line
end
getPublicId() click to toggle source
# File lib/xml/saxdriver.rb, line 98
def getPublicId
  @publicId
end
getSystemId() click to toggle source
# File lib/xml/saxdriver.rb, line 102
def getSystemId
  @systemId
end
notationDecl(name, base, sysid, pubid) click to toggle source
# File lib/xml/saxdriver.rb, line 130
def notationDecl(name, base, sysid, pubid)
  @saxdriver.notationDecl(name, base, sysid, pubid)
end
parse(inputSource) click to toggle source
Calls superclass method
# 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
processingInstruction(target, data) click to toggle source
# File lib/xml/saxdriver.rb, line 126
def processingInstruction(target, data)
  @saxdriver.processingInstruction(target, data)
end
setDriver(saxdriver) click to toggle source
# File lib/xml/saxdriver.rb, line 86
def setDriver(saxdriver)
  @saxdriver = saxdriver
end
startElement(name, attr) click to toggle source
# File lib/xml/saxdriver.rb, line 114
def startElement(name, attr)
  @saxdriver.startElement(name, attr)
end
unparsedEntityDecl(name, base, sysid, pubid, notation) click to toggle source
# File lib/xml/saxdriver.rb, line 134
def unparsedEntityDecl(name, base, sysid, pubid, notation)
  @saxdriver.unparsedEntityDecl(name, base, sysid, pubid, notation)
end