newbie question on elements..

J

JustSomeGuy

What are the rules when placing text between keys...
(If I may call them so.)

<BookTitle>1 < 2</BookTitle>

Must this be in single/double quotes..
 
P

Patrick TJ McPhee

% (If I may call them so.)
%
% <BookTitle>1 < 2</BookTitle>

This is not well-formed.

% Must this be in single/double quotes..

No. You can escape using a CDATA section

<BookTitle><![CDATA[1 < 2]]></BookTitle>

but it's more common to use the pre-defined entity references &lt;

<BookTitle>1 &lt; 2</BookTitle>
 

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,831
Latest member
RusselWill

Latest Threads

Top