Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3458642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:00:29+00:00 2026-05-18T10:00:29+00:00

>> h={:title => hi & mv288 } => {:title=>hi & mv288} >> h.to_xml =>

  • 0
>> h={:title => "hi & mv288" }
=> {:title=>"hi & mv288"}
>> h.to_xml
=> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hash>\n  <title>hi &amp;amp; mv288</title>\n</hash>\n"
>> Hash.from_xml h.to_xml
=> {"hash"=>{"title"=>"hi & mv288"}}

If you notice line#2 and #4, the &amp; characters in the title value became & after
a series of Hash.to_xml and from_xml method calls.

Is there any way to prevent Hash.from_xml from converting &amp; into &.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:00:30+00:00Added an answer on May 18, 2026 at 10:00 am

    We switched the xml parser to Nokogiri to resolve this issue.

    Add this line in your environment.rb

    ActiveSupport::XmlMini.backend = 'Nokogiri'
    

    You will have to have nokogiri gem installed though. If you need a pure
    java implementation of nokogiri, check this out.
    https://github.com/tenderlove/nokogiri/wiki/pure-java-nokogiri-for-jruby

    The installation command is,

    gem install nokogiri --pre
    

    You may also use LibXml as XmlMiini.backend to resolve this issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying the following query results = Tickets.order(created_at DESC).where({ (title =~ params[:title]) & (name
Given the following tables: shows: title | basic_ticket_price ----------------+-------------------- Inception | $3.50 Romeo &
When setting the title attribute in Zend_Form, this is not being translated. (Label &
I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
I have a function: $(.delete).click(function() { $.ajax({ url: ServerHandler.ashx, data: mode=delete&item= + $(this).attr(title), success:
The scenario is, I have simple Post table with just title & story. after
I have a bunch of these: 'link' => http://twitter.com/home?status=Check out &quot;{title}&quot; {url}, And Want
I have URLs in this format : http://site.com/index.php?title=[SOME_UNICODE_TITLE]&id=[ID]&type=[TYPE] When I try to use htmlspecialchars
I am having trouble passing an argument: <cfset result = news.updateNews(form.id, form['title'&form.id])> I am
I have a string as below : ...[down]&lt;a title=Download: Click Here href=http://www.domain.com/T60B8JK2WT/ target=_blank&gt;&lt;strong&gt; blah

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.