XSD::XMLParser (Module)

In: xsd/xmlparser.rb
xsd/xmlparser/xmlscanner.rb
xsd/xmlparser/xmlparser.rb
xsd/xmlparser/rexmlparser.rb
xsd/xmlparser/parser.rb

Methods

Constants

NSParseRegexp = Regexp.new('^xmlns:?(.*)$')
  $1 is necessary.

Public Instance methods

[Source]

# File xsd/xmlparser.rb, line 16
  def create_parser(host, opt)
    XSD::XMLParser::Parser.create_parser(host, opt)
  end

[Source]

# File xsd/xmlparser.rb, line 24
  def filter_ns(ns, attrs)
    return attrs if attrs.nil? or attrs.empty?
    newattrs = {}
    attrs.each do |key, value|
      if (NSParseRegexp =~ key)
        # '' means 'default namespace'.

        tag = $1 || ''
        ns.assign(value, tag)
      else
        newattrs[key] = value
      end
    end
    newattrs
  end

[Validate]