Sample code for 30+ languages & platforms
JavaScript

Setting XML Tag and Content

See more XML Examples

Demonstrates how to set the tag and content of an XML node.

The following XML sample code produces this output:


<abc>123</abc>

Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat v11.4.0 or greater.
JavaScript
var xml = new CkXml();

xml.Tag = "abc";
xml.Content = "123";

console.log(xml.GetXml());