📄 dom_cdatasection.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XML DOM - CDATASection object</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>XML DOM - The CDATASection Object</h1>
<a href="dom_text.asp"><img border="0" src="../images/btn_previous.gif" alt="prev" width="100" height="20" /></a>
<a href="dom_comment.asp"><img border="0" src="../images/btn_next.gif" alt="next" width="100" height="20" /></a>
<hr />
<p class="intro">The CDATASection object represents a CDATA section in a document.</p>
<hr />
<h2>Examples</h2>
<p>The examples below use the XML file
<a target="_blank" href="books.xml">books.xml</a>. <br />
An <a href="dom_loadxmldoc.asp">external JavaScript</a> is used to load the XML file.</p>
<p><a target="_blank" href="tryit.asp@filename=try_dom_createcdatasection">createCDATASection() - Create a CDATA section node</a></p>
<hr />
<h2>The CDATASection object</h2>
<p>The CDATASection object represents a CDATA section in a document. </p>
<p>A CDATA section contains text that will NOT be parsed by a parser.
Tags inside a CDATA section will NOT be treated as markup and entities will not be expanded.
The primary purpose is for including material such as XML fragments, without
needing to escape all the delimiters.</p>
<p>The only delimiter that is recognized in a CDATA section is "]]>" - which
indicates the end of the CDATA section. CDATA sections cannot be nested.</p>
<p>
<b>IE:</b> Internet Explorer, <b>F:</b> Firefox, <b>O:</b> Opera, <b>W3C:</b>
World Wide Web Consortium (Internet Standard)</p>
<h3>CDATASection Object Properties</h3>
<table border="1" width="100%" class="ex" cellspacing="0" id="table11">
<tr>
<th width="25%" align="left" valign="top">Property</th>
<th width="55%" align="left" valign="top">Description</th>
<th width="5%" align="left" valign="top">IE</th>
<th width="4%" align="left" valign="top">F</th>
<th width="4%" align="left" valign="top">O</th>
<th width="7%" align="left" valign="top">W3C</th>
</tr>
<tr>
<td valign="top"><a href="prop_cdata_data.asp">data</a></td>
<td valign="top">Sets or returns the text of this node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="prop_cdata_length.asp">length</a></td>
<td valign="top">Returns the length of the CDATA section</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
</table>
<h3>CDATASection Object Methods</h3>
<table border="1" width="100%" class="ex" cellspacing="0" id="table10">
<tr>
<th width="45%" align="left" valign="top">Method</th>
<th width="35%" align="left" valign="top">Description</th>
<th width="5%" align="left" valign="top">IE </th>
<th width="4%" align="left" valign="top">F</th>
<th width="4%" align="left" valign="top">O</th>
<th width="7%" align="left" valign="top">W3C</th>
</tr>
<tr>
<td valign="top"><a href="met_cdata_appenddata.asp">appendData()</a></td>
<td valign="top">Appends data to the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_cdata_deletedata.asp">deleteData()</a></td>
<td valign="top">Deletes data from the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_cdata_insertdata.asp">insertData()</a></td>
<td valign="top">Inserts data into the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_cdata_replacedata.asp">replaceData()</a></td>
<td valign="top">Replaces data in the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_cdata_splittext.asp">splitText()</a></td>
<td valign="top">Splits the CDATA node into two nodes</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><a href="met_cdata_substringdata.asp">substringData()</a></td>
<td valign="top">Extracts data from the node</td>
<td valign="top">6</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
</table>
<br />
<hr />
<a href="dom_text.asp"><img border="0" src="../images/btn_previous.gif" alt="prev" width="100" height="20" /></a>
<a href="dom_comment.asp"><img border="0" src="../images/btn_next.gif" alt="next" width="100" height="20" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -