Ruby on Rails Tuesday, November 2, 2010

David Kahn wrote in post #958607:
> Cant seem to find an answer to this on google:
>
> If I have this value as the text within an attribute in my xml source:
> "a2/PP00nFwWa7I8Jog7bcw==\n"
>
> When I ask Nokogiri to return it, why does it return this:
> "a2/PP00nFwWa7I8Jog7bcw== " (the last character I confirmed in the
> debugger
> as a space character). So it seems Nokogiri is converting the "\n" to a
> space.
>
> Is there a way to tell Nokogiri to return verbatim? I am dealing with
> encrypted data and this modification which it is making to the xml
> source is
> significant?

You probably need to use the xml:space attribute in your source
document, or at least that's the impression I get from
http://msdn.microsoft.com/en-us/library/ms256097.aspx .

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment