Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making text render exatly how it is in the .xml file

Status
Not open for further replies.

blues77

Programmer
Jun 11, 2002
230
CA
Hi,

I'm really new to XML coding and I wondered is the a way using the DocBook DTD to have text rendered exactly as it is saved in a .xml file. For example if i have the text.

Sally sells seashells
by the seashore

Is there away to force the text to be displayed exactly as it is in the XML file. In this case it would have a newline character after the word "seashells". I have been foring this to happen by using <simplelist><member>some text</member></simplelist> but this is very tedious and time consuming. Any help is greatly apprecited.

Thanks
Mike
 
hi,

use:
Code:
<![CDATA[Sally sells seashells
by the seashore]]>

Text in the cdata section will stay exactly the way you typed it. you can even use special characters like & <>
regards, goaganesha
 
Hi,

I tried you suggestion and it didn't work. I embedded this <![CDATA[some text
some some ]]> inside a <listitem> tag. Not sure if that might have cause dit not to work.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top