writeToString(): String;
The writeToString method of the JadeXMLNode class writes the XML representation of the node to a string and then returns the string.
You can control the format of the output by setting the JadeXMLDocument class formatting properties of the document object; for example, the endOfLine and indentString properties.
The following example parses a simple document string and formats the print output.
write1();
vars
doc : JadeXMLDocument;
begin
create doc;
doc.indentString := ' ';
doc.parseString('<name><first>John</first><last>Smith</last></name>');
write doc.writeToString;
delete doc;
end;
The output from the write1 method shown in the previous example is as follows.
<?xml version="1.0"?>
<name>
<first>John</first>
<last>Smith</last>
</name>