Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Unescape xml element content
Jon Stenqvist
7/11/2008 12:38:00 PM
Is there a way to unescape this string?
<name>Lätt B bed. Två omgångar A:0 och A:0</name>
--
Posted via
http://www.ruby-...
.
2 Answers
Axel Etzold
7/11/2008 1:12:00 PM
0
-------- Original-Nachricht --------
> Datum: Fri, 11 Jul 2008 21:37:30 +0900
> Von: Jon Stenqvist <jon@equipe.nu>
> An: ruby-talk@ruby-lang.org
> Betreff: Unescape xml element content
> Is there a way to unescape this string?
>
> <name>Lätt B bed. Två omgångar A:0 och A:0</name>
> --
> Posted via
http://www.ruby-...
.
Dear John,
require "CGI"
p CGI.unescapeHTML("<name>Lätt B bed. Två omgångar A:0 och A:0</name>")
should do it.
Best regards,
Axel
--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzz...
matt
7/11/2008 3:02:00 PM
0
Jon Stenqvist <jon@equipe.nu> wrote:
> Is there a way to unescape this string?
>
> <name>Lätt B bed. Två omgångar A:0 och A:0</name>
I think this works correctly:
require 'rexml/document'
s = "<name>Lätt B bed. Två omgångar A:0 och A:0</name>"
puts REXML::Text::unnormalize(s)
m.
--
matt neuburg, phd = matt@tidbits.com,
http://www.tidbits...
Leopard -
http://www.takecontrolbooks.com/leopard-custom...
AppleScript -
http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart.
http://www.t...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Unescape xml element content
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password