YouTip LogoYouTip

Met Cdata Appenddata

# XML DOM appendData() Method * * CDATA Object](#) * * * ## Definition and Usage The appendData() method appends data to the end of a CDATA node. ## Syntax CDATANode.appendData(string) | Parameter | Description | | :--- | :--- | | string | Required. The string to append to the CDATA node. | * * * ## Example The following code snippet uses [loadXMLDoc()](#) to load "[books_cdata.xml](#)" into xmlDoc and appends text to the first element: ## Example xmlDoc=loadXMLDoc("books_cdata.xml"); x=xmlDoc.getElementsByTagName("html").childNodes; x.appendData(" Wonderful!"); document.write(x.data); Output: **Stunning!** Wonderful! [Try it Β»](#) * * CDATA Object](#)
← Met Cdata DeletedataProp Cdata Length β†’