Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Unescape xml element content
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jon Stenqvist  
View profile   Translate to Translated (View Original)
 More options Jul 11 2008, 8:37 am
Newsgroups: comp.lang.ruby
From: Jon Stenqvist <j...@equipe.nu>
Date: Fri, 11 Jul 2008 07:37:30 -0500
Local: Fri, Jul 11 2008 8:37 am
Subject: Unescape xml element content
Is there a way to unescape this string?

<name>L&#xE4;tt B bed. Tv&#xE5; omg&#xE5;ngar A:0 och A:0</name>
--
Posted via http://www.ruby-forum.com/.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Axel Etzold  
View profile   Translate to Translated (View Original)
 More options Jul 11 2008, 9:12 am
Newsgroups: comp.lang.ruby
From: Axel Etzold <AEtz...@gmx.de>
Date: Fri, 11 Jul 2008 08:12:04 -0500
Local: Fri, Jul 11 2008 9:12 am
Subject: Re: Unescape xml element content

-------- Original-Nachricht --------

> Datum: Fri, 11 Jul 2008 21:37:30 +0900
> Von: Jon Stenqvist <j...@equipe.nu>
> An: ruby-t...@ruby-lang.org
> Betreff: Unescape xml element content
> Is there a way to unescape this string?

> <name>L&#xE4;tt B bed. Tv&#xE5; omg&#xE5;ngar A:0 och A:0</name>
> --
> Posted via http://www.ruby-forum.com/.

Dear John,

require "CGI"
p CGI.unescapeHTML("<name>L&#xE4;tt B bed. Tv&#xE5; omg&#xE5;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/puzzle...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matt neuburg  
View profile  
 More options Jul 11 2008, 11:02 am
Newsgroups: comp.lang.ruby
From: m...@tidbits.com (matt neuburg)
Date: Fri, 11 Jul 2008 08:02:05 -0700
Local: Fri, Jul 11 2008 11:02 am
Subject: Re: Unescape xml element content

Jon Stenqvist <j...@equipe.nu> wrote:
> Is there a way to unescape this string?

> <name>L&#xE4;tt B bed. Tv&#xE5; omg&#xE5;ngar A:0 och A:0</name>

I think this works correctly:

require 'rexml/document'
s = "<name>L&#xE4;tt B bed. Tv&#xE5; omg&#xE5;ngar A:0 och A:0</name>"
puts REXML::Text::unnormalize(s)

m.
--
matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/
Leopard - http://www.takecontrolbooks.com/leopard-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »