DOM EXPORT TO VAR

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


DOM EXPORT TO VAR (elementRef; vXmlVar)

ParameterTypeDescription
elementRefStringRoot XML element reference
vXmlVarText | BLOBVariable to receive XML tree

Description

The DOM EXPORT TO VAR command allows you to save an XML tree in a text or BLOB variable.

Pass the root element reference to export in elementRef.

Pass the name of the variable that must contain the XML tree in vXmlVar. This variable must either be a Text or BLOB type. You can select the type depending on what you plan on doing next or the size that the tree can reach (remember that Text type variables are limited to 32,000 characters).

Keep in mind that if you use a Text variable to store elementRef, it will be encoded using the "current" Mac character set (i.e. Mac Roman on most Western systems). This means that the text returned will lose its original encoding (encoding="xxx"). In this case, the vVarXml variable allows you to view or store the code but NOT to generate a valid XML document (using the SEND PACKET command for example).

Example

This example stores the tree vElemRef in a text variable:

   C_TEXT(vtMyText)
   DOM EXPORT TO VAR(vElemRef;vtMyText)

See Also

DOM EXPORT TO FILE.

System Variables or Sets

If the command has been executed correctly, the system variable OK is set to 1. Otherwise, it is set to 0 and an error is generated (for example, if the element reference is invalid).


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next