Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html tag as value to a xml tag

 
Lok Manick
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I add a html tag as value to a xml tag? something like this

<application_property id="92" name="customerService.generalmail"
value="XXX HealthCare,<br/> 1 Knowe Road,<br/>Greenock<br/> created="2008-08-07 12:24:15.707"/>

Note: <br/> in value.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In short no, the '<' character is not allowed in an attribute value
 
Lok Manick
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any other alter way to do it buddy???

I thought in java we use \" to add " to String is there such a way???
[ September 10, 2008: Message edited by: Lok Manick ]
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it wasn't an attribute value but instead an element value you could use a CDATA section. I'm not sure if you can escape the '<' character with the '\' character, are you able to give it a go?
 
Lok Manick
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Martijn...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic