Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • xsd/xmlparser.rb
  • xsd/xmlparser/parser.rb
  • xsd/xmlparser/rexmlparser.rb
  • xsd/xmlparser/xmlparser.rb
  • xsd/xmlparser/xmlscanner.rb

Class/Module Index [+]

Quicksearch

XSD::XMLParser

Constants

NSParseRegexp

$1 is necessary.

Public Class Methods

create_parser(host, opt) click to toggle source
 
               # File xsd/xmlparser.rb, line 16
def create_parser(host, opt)
  XSD::XMLParser::Parser.create_parser(host, opt)
end
            
filter_ns(ns, attrs) click to toggle 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