new(arg, encoding=nil)
public
Constructor @param arg must be a String, and
should be a valid XML document @param encoding if
non-null, sets the encoding of the source to this value, overriding all
encoding detection
Show source
def initialize(arg, encoding=nil)
@orig = @buffer = arg
if encoding
self.encoding = encoding
else
detect_encoding
end
@line = 0
end