Parse / write XML without changing character encoding

Discussion in 'Ruby' started by helzer, Oct 19, 2007.

  1. helzer

    helzer Guest

    I need to change some things inside an XML document, so I'm reading it
    with REXML, changing the attributes I need and writing back.

    In the process I see that the character encoding changes all over.

    1) UTF-8 encoded characters get decoded.
    2) HTML escape are un-escaped (like & becoming &, > becoming
    <).

    Is there a way to tell REXML not to do this? Just leave everything
    inside the texts as it was?

    Thanks,
    Helzer
     
    helzer, Oct 19, 2007
    #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. John Dalberg
    Replies:
    2
    Views:
    1,553
    Juan T. Llibre
    Oct 17, 2005
  2. Replies:
    1
    Views:
    23,578
    Real Gagnon
    Oct 8, 2004
  3. raavi
    Replies:
    2
    Views:
    934
    raavi
    Mar 2, 2006
  4. kellner
    Replies:
    0
    Views:
    894
    kellner
    Jul 23, 2006
  5. David Komanek
    Replies:
    11
    Views:
    307
    David Komanek
    Sep 30, 2003
Loading...

Share This Page