Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Builder::XmlMarkup + output encoding

Reply
Thread Tools

Builder::XmlMarkup + output encoding

 
 
Raimon Fs
Guest
Posts: n/a
 
      06-19-2010
Hi,

Is it possible to NOT encode or escape some chars in Builder ?


code:
----------------

require 'rubygems'
require 'builder'

builder = Builder::XmlMarkup.new(:target=>STDOUT, :indent=>2)
builder.instruct!
builder.person { |b| b.name("Jim Fernández"); b.phone("555-1234") }


output:
----------------

<?xml version="1.0" encoding="UTF-8"?>
<person>
<name>Jim Fern&#225;ndez</name>
<phone>555-1234</phone>
</person>


I want:
-----------------

<?xml version="1.0" encoding="UTF-8"?>
<person>
<name>Jim Fernández</name>
<phone>555-1234</phone>
</person>

thanks!

m.
--
Posted via http://www.ruby-forum.com/.

 
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
Reading Text File Encoding and converting to Perls internal UTF-8 encoding sln@netherlands.com Perl Misc 2 04-17-2009 11:22 PM
Unicode/UTF-8 Encoding and ASP.NET Output =?Utf-8?B?QWxleCBNYWdoZW4=?= ASP .Net 2 05-23-2006 03:08 AM
changing JVM encoding; setting -Dfile.encoding doesn't work pasmol@plusnet.pl Java 1 10-08-2004 09:50 PM
Encoding.Default and Encoding.UTF8 Hardy Wang ASP .Net 5 06-09-2004 04:04 PM
XSL output and/or encoding question.. Beowulf XML 3 10-29-2003 06:25 PM



Advertisments