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

Forum statistics

Threads
474,266
Messages
2,571,080
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top