Module: XSD::XMLParser
- Defined in:
- lib/action_web_service/xsd/xmlparser.rb,
lib/action_web_service/xsd/xmlparser/parser.rb,
lib/action_web_service/xsd/xmlparser/xmlparser.rb,
lib/action_web_service/xsd/xmlparser/xmlscanner.rb,
lib/action_web_service/xsd/xmlparser/rexmlparser.rb
Defined Under Namespace
Classes: Parser, REXMLParser, XMLParser, XMLScanner
Constant Summary collapse
- NSParseRegexp =
$1 is necessary.
Regexp.new('^xmlns:?(.*)$')
Class Method Summary collapse
Class Method Details
.create_parser(host, opt) ⇒ Object
16 17 18 |
# File 'lib/action_web_service/xsd/xmlparser.rb', line 16 def create_parser(host, opt) XSD::XMLParser::Parser.create_parser(host, opt) end |
.filter_ns(ns, attrs) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/action_web_service/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 |