Raw data in xml

Discussion in 'Ruby' started by Don French, Mar 23, 2010.

  1. Don French

    Don French Guest

    I have a array of lines that are actually a final document that I need
    to put into one XML file/buffer as one element including all newlines
    and formfeed characters. Actually all control characters.

    The snippet of XmlBuilder is:

    x.report @lines[@first_line_index..-1].each { |line| "#{line}\n"}

    originally tried:

    x.report @lines[@first_line_index..-1].each { |line| "#{line}"}

    When I look at the buffer created in both cases, there are no newlines
    in the buffer.

    How can I do that?

    Don French
    Don French, Mar 23, 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. Jesse Liberty
    Replies:
    1
    Views:
    435
    Joerg Jooss
    Aug 22, 2004
  2. sreenivasan alakappan

    Parsing Raw filter text data using XML

    sreenivasan alakappan, Jan 13, 2004, in forum: XML
    Replies:
    0
    Views:
    406
    sreenivasan alakappan
    Jan 13, 2004
  3. Doug Day
    Replies:
    0
    Views:
    379
    Doug Day
    Jun 22, 2004
  4. Replies:
    0
    Views:
    430
  5. Replies:
    8
    Views:
    337
    Gabriel Genellina
    Jan 30, 2007
Loading...

Share This Page