unknown error

M

Martin Uruz

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
 
J

Jim Menard

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, (e-mail address removed), http://www.io.com/~jimm/
Dash dash space newline
Four-line witty quotation
Perfect message end
-- Donald Welsh in rec.humor.oracle.d
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top