tags:

views:

22

answers:

1

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?

+4  A: 

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>
Lloyd
Took the liberty of copying the example to the answer, in case the link dies/gets moved/etc.
T.J. Crowder
Yeh good point.
Lloyd
they could make a easier to remember way.. Thanks!
Tom Brito