Builder::XmlMarkup + output encoding

Discussion in 'Ruby' started by Raimon Fs, Jun 19, 2010.

  1. Raimon Fs

    Raimon Fs Guest

    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á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/.
    Raimon Fs, Jun 19, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Cox

    Combining XmlMarkup objects?

    Andrew Cox, Jun 9, 2005, in forum: Ruby
    Replies:
    2
    Views:
    183
    Andrew Cox
    Jun 10, 2005
  2. Daniel Sheppard
    Replies:
    0
    Views:
    143
    Daniel Sheppard
    Oct 28, 2005
  3. Farrel Lifson
    Replies:
    4
    Views:
    147
    Farrel Lifson
    Jul 19, 2006
  4. ted
    Replies:
    2
    Views:
    117
  5. M. Ayhan
    Replies:
    0
    Views:
    74
    M. Ayhan
    Dec 3, 2008
Loading...

Share This Page