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

In Files

  • wsdl/parser.rb
  • wsdl/soap/binding.rb
  • wsdl/soap/operation.rb
  • wsdl/xmlSchema/complexContent.rb
  • wsdl/xmlSchema/element.rb

Class/Module Index [+]

Quicksearch

WSDL::Parser

Public Class Methods

new(opt = {}) click to toggle source
 
               # File wsdl/parser.rb, line 52
def initialize(opt = {})
  @parser = XSD::XMLParser.create_parser(self, opt)
  @parsestack = nil
  @lastnode = nil
  @ignored = {}
  @location = opt[:location]
  @originalroot = opt[:originalroot]
end
            

Public Instance Methods

characters(text) click to toggle source
 
               # File wsdl/parser.rb, line 88
def characters(text)
  lastframe = @parsestack.last
  if lastframe
    # Need not to be cloned because character does not have attr.
    ns = lastframe.ns
    decode_text(ns, text)
  else
    p text if $DEBUG
  end
end
            
charset() click to toggle source
 
               # File wsdl/parser.rb, line 69
def charset
  @parser.charset
end
            
end_element(name) click to toggle source
 
               # File wsdl/parser.rb, line 99
def end_element(name)
  lastframe = @parsestack.pop
  unless name == lastframe.name
    raise UnexpectedElementError.new("closing element name '#{name}' does not match with opening element '#{lastframe.name}'")
  end
  decode_tag_end(lastframe.ns, lastframe.node)
  @lastnode = lastframe.node
end
            
parse(string_or_readable) click to toggle source
 
               # File wsdl/parser.rb, line 61
def parse(string_or_readable)
  @parsestack = []
  @lastnode = nil
  @textbuf = ''
  @parser.do_parse(string_or_readable)
  @lastnode
end
            
start_element(name, attrs) click to toggle source
 
               # File wsdl/parser.rb, line 73
def start_element(name, attrs)
  lastframe = @parsestack.last
  ns = parent = nil
  if lastframe
    ns = lastframe.ns.clone_ns
    parent = lastframe.node
  else
    ns = XSD::NS.new
    parent = nil
  end
  attrs = XSD::XMLParser.filter_ns(ns, attrs)
  node = decode_tag(ns, name, attrs, parent)
  @parsestack << ParseFrame.new(ns, name, node)
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus