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. Advertisements

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. sreenivasan alakappan

    Parsing Raw filter text data using XML

    sreenivasan alakappan, Jan 13, 2004, in forum: XML
    Replies:
    0
    Views:
    485
    sreenivasan alakappan
    Jan 13, 2004
  2. Doug Day
    Replies:
    0
    Views:
    477
    Doug Day
    Jun 22, 2004
  3. Replies:
    0
    Views:
    510
  4. Replies:
    0
    Views:
    544
  5. Stylus Studio
    Replies:
    0
    Views:
    600
    Stylus Studio
    Sep 26, 2006
  6. Replies:
    8
    Views:
    420
    Gabriel Genellina
    Jan 30, 2007
  7. Matt
    Replies:
    3
    Views:
    553
    Bob Barrows [MVP]
    Apr 23, 2004
  8. Erik Wasser
    Replies:
    5
    Views:
    813
    Peter J. Holzer
    Mar 5, 2006
Loading...