Endline Character in XML Attribute

R

Ravi

Hi,

I want to use end line character('\n') in the XML Attribute like
<message confirm=" This will kill your process . \n Are you sure to
proceeed? "/>

But in java xml processor, it is considered as two characters "\" and
"n". I used the xml encoding type as "ISO-8859-1".

Pls any one help me on it ?


Thanks,
Ravi.
 
R

Richard Tobin

Ravi said:
I want to use end line character('\n') in the XML Attribute

The \n syntax is just something that some programming languages like
C and Java use.

In XML you can use a character reference:
.
<message confirm=" This will kill your process . \n Are you sure to
proceeed? "/>

Generally I wouldn't recommend using an attribute for messages. Why
not use something like

<message>This will kill your process.
Are you sure to proceeed?</message>

-- Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top