How to enter < char in my text

I

Ian Pellew

Hi All;

Whats the xml way to have text include html type tags in?

<Value>
My text that will include <mytag> kjkjhkjh </mytag>
</value>

I am after shielding my text from the xml interpriter.

Regards
Ian
 
P

Patrick TJ McPhee

% Whats the xml way to have text include html type tags in?
%
% <Value>
% My text that will include <mytag> kjkjhkjh </mytag>
% </value>

% I am after shielding my text from the xml interpriter.

If you have a lot of text, use a CDATA section

<Value>
<![CDATA[My text that will include <mytag> kjkjhkjh </mytag>]]>
</value>

If you want to include ]]> in the text, you have to end the CDATA
section first.

If you have just one or two <s, you can use &lt;. This is one of
five pre-defined entities which you will read about in any basic
introduction to XML.
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,833
Latest member
BettyeMacf

Latest Threads

Top