Sha256: db9886a07a1b707c20d7164d9c0ed772bd7da8b7943ea8c31314bf40989910d9
Contents?: true
Size: 780 Bytes
Versions: 2
Compression:
Stored size: 780 Bytes
Contents
## -*- Ruby -*- ## XML::DOM::DOMEntityResolverImpl ## 2001 by yoshidam ## require 'xml/dom2/domentityresolver' require 'xml/dom2/dominputsource' module XML module DOM class DOMEntityResolverImpl include DOMEntityResolver ## replace 'open' by WGET::open begin require 'wget' ## include WGET rescue ## ignore end ## DOMInputSource resolveEntity(publicId, systemId) def resolveEntity(publicId, systemId) ret = DOMInputSource.new ret.publicId = publicId ret.systemId = systemId if systemId =~ /file:/ ret.byteStream = open(systemId.sub('^file://', '')) else ret.byteStream = WGET::open(systemId) end ret end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
mame-xmlparser-0.6.81.1 | lib/xml/dom2/domentityresolverimpl.rb |
xmlparser-0.6.81 | lib/xml/dom2/domentityresolverimpl.rb |