File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

closing tag > as value?

 
nimo frey
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I set the value ">=" to my Label?



does not work as > is recogniced as a closing tag.

This does also not work:

 
arulk pillai
Author
Ranch Hand
Posts: 3380
 
nimo frey
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks !
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17626
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, to bring it inline, JSF is an XML form, so it obeys XML rules. There are 5 characters that XML parsers are sensitive to, and which may require escaping (entity specification):

< &lt;
> &gt;
" &quot;
' &apos;
& &amp;

Note that the ";" at the end is required - I've seen some sloppy sites that left them off because apparently some browsers weren't diligent about proper form, but that meant that unless you were running the proper browser, the site looked like an amateur job.

I mentioned that JSF is XML form. You can use JSF in an HTML context, where the rules may be more lax, but I personally recommend using an actual XML context such as xhtml. That way you have the benefit of tools that will do that little extra bit of validation at source time. Also it's easier for automated tools to work with XML formats, since they don't have the unpredictability of raw HTML. For example, unbalanced tags such as <br>.
 
nimo frey
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic