Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

XML - Endline Character in XML Attribute

 
Thread Tools Search this Thread
Old 09-09-2006, 09:43 AM   #1
Default Endline Character in XML Attribute


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.



Ravi
  Reply With Quote
Old 09-09-2006, 11:14 AM   #2
Richard Tobin
 
Posts: n/a
Default Re: Endline Character in XML Attribute

In article < .com>,
Ravi <> wrote:

>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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump