Unknown error

hi
the following code produces this error:

/usr/lib/ruby/site_ruby/1.8/nqxml/tokenizer.rb:56: warning: string
pattern instead of regexp; metacharacters no longer effective

code:
begin
xmlstr = File.open(“tagebuch.xml”) { |f| f.read}
xmlTagebuch = NQXML::TreeParser.new(xmlstr).document
rescue NQXML::ParserError => ex
puts “Fehler in Zeile #{ex.line}” + " bei Zeichen #{ex.column}:
#{$!}"
end
can this be a error in my xml file?
i am new in ruby!!

···


thx
martin pfeffer
at
suse 9.0
Apache 2.0
http://eurowalker.is.dreaming.org

Martin,

the following code produces this error:

/usr/lib/ruby/site_ruby/1.8/nqxml/tokenizer.rb:56: warning: string
pattern instead of regexp; metacharacters no longer effective

This is not your error; it is a warning that some NQXML code is doing
things the old, deprecated way. NQXML was written in the days of Ruby
1.6. With Ruby 1.8, using strings instead of regular expressions is
deprecated. I will take a look at updating NQXML when I have time
(hah!).

If your investment in NQXML is not too heavy, may I suggest switching
to REXML? This may sound funny coming from the author of NQXML, but
REXML is (a) included with Ruby now and (b) better than NQXML.

Jim

···


Jim Menard, jimm@io.com, http://www.io.com/~jimm/
Dash dash space newline
Four-line witty quotation
Perfect message end
– Donald Welsh in rec.humor.oracle.d