Class XSD::XMLParser::Nokogiri
In: lib/xsd/xmlparser/nokogiri.rb
Parent: XSD::XMLParser::Parser

Nokogiri XML parser for soap4r.

Nokogiri may be used as the XML parser in soap4r. Simply require ‘xsd/xmlparser/nokogiri’ in your soap4r applications, and soap4r will use Nokogiri as it‘s XML parser. No other changes should be required to use Nokogiri as the XML parser.

Example (using UW ITS Web Services):

  require 'rubygems'
  require 'nokogiri'
  gem 'soap4r'
  require 'defaultDriver'
  require 'xsd/xmlparser/nokogiri'

  obj = AvlPortType.new
  obj.getLatestByRoute(obj.getAgencies.first, 8).each do |bus|
    p "#{bus.routeID}, #{bus.longitude}, #{bus.latitude}"
  end

Methods

Public Class methods

Create a new XSD parser with host and opt

Public Instance methods

Handle cdata_blocks containing string

Start parsing string_or_readable

Handle the end_element event with name

Handle errors with message msg

Handle the start_element event with name and attrs

warning(msg)

Alias for error

[Validate]