wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes html tag as value to a xml tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "html tag as value to a xml tag" Watch "html tag as value to a xml tag" New topic
Author

html tag as value to a xml tag

Lok Manick
Ranch Hand

Joined: Jan 24, 2005
Posts: 71
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.


with regards,
Loks (SCJP, SCWCD)
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

In short no, the '<' character is not allowed in an attribute value


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Lok Manick
Ranch Hand

Joined: Jan 24, 2005
Posts: 71
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

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

Joined: Jan 24, 2005
Posts: 71
Thanks Martijn...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html tag as value to a xml tag
 
Similar Threads
'a href' in firefox
"a name" tag
How to make scrollable table scroll to a specific row
Keyword xsl:output may not be used here.
word wrapping tooltips