chadmichael Posted September 27, 2006 Share Posted September 27, 2006 Hello,When I run Tidy on my document, some CDATA structure is placed around my function. However, its commented out. What would be the purpose of this CDATA structure? Is is required for XHTML compliance? I guess its not fully required or Tidy would not have made the stuff commented out. <script type="text/javascript">//<![CDATA[ function newWindow() {foodWindow = window.open("images/snowyGate.jpg", "foodWin", "width=250,height=188")} //]]> </script> Thanks,Chad Link to comment Share on other sites More sharing options...
scott100 Posted September 28, 2006 Share Posted September 28, 2006 It just tells the xml parser to ignore the javascript between it.http://www.w3schools.com/xml/xml_cdata.asp Link to comment Share on other sites More sharing options...
chadmichael Posted September 28, 2006 Author Share Posted September 28, 2006 It just tells the xml parser to ignore the javascript between it.http://www.w3schools.com/xml/xml_cdata.asp Is this for performance, i.e. speeding up the parsing? Or is it only necessary when some kind of illegal or problematic character sequence exists within the text? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now