Module XSD::XMLParser
In: lib/xsd/xmlparser/rexmlparser.rb
lib/xsd/xmlparser/xmlscanner.rb
lib/xsd/xmlparser/parser.rb
lib/xsd/xmlparser/xmlparser.rb
lib/xsd/xmlparser.rb

Methods

Classes and Modules

Class XSD::XMLParser::Parser
Class XSD::XMLParser::REXMLParser
Class XSD::XMLParser::XMLParser
Class XSD::XMLParser::XMLScanner

Constants

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

Public Instance methods

[Source]

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

[Source]

    # File lib/xsd/xmlparser.rb, line 24
24:   def filter_ns(ns, attrs)
25:     return attrs if attrs.nil? or attrs.empty?
26:     newattrs = {}
27:     attrs.each do |key, value|
28:       if (NSParseRegexp =~ key)
29:         # '' means 'default namespace'.
30:         tag = $1 || ''
31:         ns.assign(value, tag)
32:       else
33:         newattrs[key] = value
34:       end
35:     end
36:     newattrs
37:   end

[Validate]