Skip to content

XML_WRITE_CONTENT ​

XML_WRITE_CONTENT writes the content (value) of a node.

Syntax ​

leo-grammar
CC "Documentation" XML_WRITE_CONTENT strValue

#--> RESULT ecode:intValue
CC "Documentation" XML_WRITE_CONTENT strValue

#--> RESULT ecode:intValue

Parameters ​

  • <main-parameter> (strValue) - the text that should be written to the output file. Special characters (<, >, &, ..) are masked.

Returns ​

  • ecode (intValue) - Contains the error code or is 0 in case of success; 28 - XML_NOFORMATTER - no file has yet been opened for writing.

Details ​

See Also ​

Examples ​

asc
CC "Documentastion" XML_OPEN "test.xml" write
CC "Documentation" XML_WRITEPLAIN "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"
CC "Documentation" XML_WRITE_START_NODE "MODEL"
CC "Documentation" XML_WRITE_ATTRIBUTE "type" value:"gp"
CC "Documentation" XML_WRITE_CONTENT "Ein Modell"
CC "Documentation" XML_WRITE_END_NODE "MODEL"
CC "Documentation" XML_CLOSE write
#
# produced the follofing file:
# <?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
# <MODEL type="gp">Ein Modell</MODEL>
#
CC "Documentastion" XML_OPEN "test.xml" write
CC "Documentation" XML_WRITEPLAIN "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"
CC "Documentation" XML_WRITE_START_NODE "MODEL"
CC "Documentation" XML_WRITE_ATTRIBUTE "type" value:"gp"
CC "Documentation" XML_WRITE_CONTENT "Ein Modell"
CC "Documentation" XML_WRITE_END_NODE "MODEL"
CC "Documentation" XML_CLOSE write
#
# produced the follofing file:
# <?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
# <MODEL type="gp">Ein Modell</MODEL>
#

Versions and Changes ​

Available since ADOxx 1.3