Hi guys!
I have a problem when i try to write the & symbol in the textview class!
Error: Error parsing XML: not well-formed (invalid token)
Textview class: how can write a „&“ ?
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: Textview class: how can write a „&“ ?
There are five special characters in xml that require special codes to render. The code for ampersand is "& amp ;" with the spaces and quotes removed.
Source: http://xml.silmaril.ie/specials.html
Source: http://xml.silmaril.ie/specials.html
I'm on registered MorphOS using FlowStudio.
Re: Textview class: how can write a „&“ ?
ok - thanks!
But when i use & in the Hollywoodapp is see always two & signs (&&)??
But when i use & in the Hollywoodapp is see always two & signs (&&)??
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Textview class: how can write a „&“ ?
What do you mean by "in the Hollywood app"?
Re: Textview class: how can write a „&“ ?
are you looking for this:
This "\" can be used for others too.
Code: Select all
text = "to use \"quote\""
TextOut(100, 100, text)
WaitRightMouse()
Re: Textview class: how can write a „&“ ?
OK
Here is a little code to demonstrate the "double sign bug???"
And here the result is a double & sign
Here is a little code to demonstrate the "double sign bug???"
Code: Select all
@REQUIRE "RapaGUI"
xml = [[
<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="Textview example">
<vgroup>
<textview>
Hello & World
</textview>
</vgroup>
</window>
</application>
]]
moai.CreateApp(xml)
Repeat
WaitEvent
Forever
Re: Textview class: how can write a „&“ ?
On MorphOS I only get one & character with that example... so it must be a platform dependant bug...
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Textview class: how can write a „&“ ?
Actually, with my WIP version of RapaGUI 2.0 the code posted by root works fine on Windows too. So I think this has been fixed already...