XML DOM appendData() Method
Complete CDATA Object Reference
Definition and Usage
The appendData() method adds data at the end of a CDATA node.
Syntax
CDATANode.appedData(string)
|
Parameter |
Description |
string |
Required. The string to add to the CDATA node |
Example
The following code fragment loads "books_cdata.xml"
into xmlDoc using
loadXMLDoc() and appends text to the first <html>
element:
xmlDoc=loadXMLDoc("books_cdata.xml");
x=xmlDoc.getElementsByTagName("html")[0].childNodes[0];
x.appendData(" Wonderful!");
document.write(x.data);
|
Output:
Try-It-Yourself Demos
appendData() - Append a string to a CDATA node
Complete CDATA Object Reference
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
And more…
Try before you buy with a free fully functional 30-day trial
Download today
|