Wednesday, October 12, 2011

[android-developers] Re: How to escape ampersand?

Hi thanks for your reply. if i use that class, for sure i can do the
conversion to proper character, it's only replacing string. However,
the ampersand tags are very many, you can see the list here:
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

I think it's impossible to list all the ampersand tags one by one and
of course the running time of the application will be much slower.

On Oct 12, 3:04 pm, Zsolt Vasvari <zvasv...@gmail.com> wrote:
> Perhaphs studying the documenation of the most basic Java class would
> be helpful:
>
> http://download.oracle.com/javase/6/docs/api/java/lang/String.html
>
> On Oct 12, 3:35 pm, ndiiie90 <rnd...@gmail.com> wrote:
>
>
>
>
>
>
>
> > thanks for your reply. But that what i mean.
> > What i want is to convert string, such as
>
> > &quot to "
> > &amp to &
> > &lt to <
> > &gt to >
>
> > etc
>
> > How to do it?
> > i've used other library, such as jsoup but it seems it can't convert
> > all ampersand characters.
>
> > On Oct 12, 2:20 pm, Francisco Dalla Rosa soares <soa...@argo.bz>
> > wrote:
>
> > > how about this?
>
> > > java.net.URLEncoder.encode(string, "ISO-8859-1");
>
> > > 2011/10/12 ndiiie 90 <rnd...@gmail.com>
>
> > > > Hi all,
>
> > > > how to escape ampersand, such as &lt; &gt; &quot; &amp;
> > > > And change it to proper character?
>
> > > > Thanks
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscribe@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > 株式会社アルゴ ARGO Inc.
> > > 〒130-0012
> > > 東京都墨田区太平3-11-10
> > > NTKオオノビル8階
>
> > > ソアレス フランシスコ ( Soares Francisco )
> > > Mail : soa...@argo.bz HP :http://www.argo.bz/
> > > TEL:03-5619-4511 FAX:03-5619-4512- Hide quoted text -
>
> > - Show quoted text -

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

No comments:

Post a Comment