I can't remember of find, but I know there were a way using something like <[CODE to write code inside the xml without have problems with the xml reserved symbols.. Does anyone knows?
-
See also: When is a CDATA section necessary within a script tag? and Should I use “]]>” or “//]]>” for closing a CDATA section into xHTMLShog9– Shog92010-09-22 16:26:27 +00:00Commented Sep 22, 2010 at 16:26
Add a comment
|
1 Answer
Yep, using CDATA - http://www.w3schools.com/xml/xml_cdata.asp
Example:
<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
{
return 1;
}
else
{
return 0;
}
}
]]>
</script>
2 Comments
T.J. Crowder
Took the liberty of copying the example to the answer, in case the link dies/gets moved/etc.
Student
they could make a easier to remember way.. Thanks!