0

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?

1

1 Answer 1

5

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>
Sign up to request clarification or add additional context in comments.

2 Comments

Took the liberty of copying the example to the answer, in case the link dies/gets moved/etc.
they could make a easier to remember way.. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.