Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > unknown error

Reply
Thread Tools

unknown error

 
 
Martin Uruz
Guest
Posts: n/a
 
      05-06-2004
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:arserError => 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
 
Reply With Quote
 
 
 
 
Jim Menard
Guest
Posts: n/a
 
      05-06-2004
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, http://www.velocityreviews.com/forums/(E-Mail Removed), http://www.io.com/~jimm/
Dash dash space newline
Four-line witty quotation
Perfect message end
-- Donald Welsh in rec.humor.oracle.d



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
urllib2.URLError: <urlopen error unknown url type: 'http> error usingtwill with python Mark Devine Python 2 06-29-2009 09:20 AM
Assign an unknown value to an unknown variable Vincent Arnoux Ruby 1 08-11-2006 06:12 PM
Getting Printers from AD error "Unknown error (0x80005000)" on Fin =?Utf-8?B?bXVsdGlzeW5j?= ASP .Net 0 12-13-2005 12:29 AM
Blue Screen and unknown error =?Utf-8?B?TXVuZ3Vz?= Microsoft Certification 7 12-22-2004 02:50 PM
Unknown error when open Access db Dmitry Davletbaev ASP .Net 1 02-16-2004 02:36 PM



Advertisments