[jdom-interest] Use ampersand character in setText
pacionet at gmail.com
Fri Dec 16 14:13:34 PST 2011
I am sorry, what I was looking for is :
EntityRef ref = new EntityRef("TrueNorthGuitarsTagline");
that is the EntityRef.
Sorry again and thanks for your help,
----- Original Message -----
From: "Robin Rosenberg" <robin.rosenberg.lists at dewire.com>
To: <jdom-interest at jdom.org>
Sent: Friday, December 16, 2011 5:51 PM
Subject: Re: [jdom-interest] Use ampersand character in setText
> Andrea Pacini skrev 2011-12-16 10.43:
>> according to Jdom FAQ ( http://www.jdom.org/docs/faq.html#a0290 ) , I
>> tried to write the string
>> using this statement:
>> where \u0026 is the Unicode code for ampersand character.
>> The output is:
>> Where is the error ?
> It's in your interpretation/the writing in the FAQ.
> It should be more like "Why does setText(" ") not output a NO-BREAK
> character into the XML document".
> There is no difference in Java between "&test" and "\u0026test", except
> that the
> latter is harder to read. Both translates into the exact same bytecode.
> The FAQ could be complemented with the corrected call, e.g.
> setText("\u00a0"); To make
> things more confusing Java uses hexadecimal code units while XML uses
> decimal code points.
> -- robin
> To control your jdom-interest membership:
More information about the jdom-interest