From: "NAKAMURA, Hiroshi" Date: 2001-08-07T10:33:31+09:00 Subject: [ruby-talk:19267] SOAP4R with NQXML/1.1.0 Hi all, This is a patch for SOAP4R/1.3.6 to live with NQXML/1.1.0. // NaHi Index: nqxmlparser.rb =================================================================== RCS file: /home/achilles/nakahiro/cvs_root/Ruby/soap4r/lib/soap/nqxmlparser.rb,v retrieving revision 1.2 retrieving revision 1.4 diff -u -2 -p -r1.2 -r1.4 --- nqxmlparser.rb 2001/07/24 05:14:56 1.2 +++ nqxmlparser.rb 2001/08/07 01:24:59 1.4 @@ -27,4 +27,7 @@ class SOAPNQXMLLightWeightParser < SOAPP super( *vars ) require 'nqxml/tokenizer' + unless NQXML.const_defined?( "XMLDecl" ) + NQXML.const_set( "XMLDecl", NilClass ) + end end @@ -45,5 +48,6 @@ class SOAPNQXMLLightWeightParser < SOAPP when NQXML::Text cdata( entity.text ) - when NQXML::ProcessingInstruction + # NQXML::ProcessingInstruction is for nqxml version < 1.1.0 + when NQXML::XMLDecl, NQXML::ProcessingInstruction encoding = entity.attrs[ 'encoding' ] if encoding @@ -71,4 +75,7 @@ class SOAPNQXMLStreamingParser < SOAPPar super( *vars ) require 'nqxml/streamingparser' + unless NQXML.const_defined?( "XMLDecl" ) + NQXML.const_set( "XMLDecl", NilClass ) + end end @@ -89,5 +96,6 @@ class SOAPNQXMLStreamingParser < SOAPPar when NQXML::Text cdata( entity ) - when NQXML::ProcessingInstruction + # NQXML::ProcessingInstruction is for nqxml version < 1.1.0 + when NQXML::XMLDecl, NQXML::ProcessingInstruction encoding = entity.attrs[ 'encoding' ] if encoding