obj objRef createAndLoadXml

Available for: Content Management Server

Task: Creates a new file with a draft version and loads the specified XML blob. The specified file in which the new file is to be created must be a folder.

Syntax:

obj (withId objId) | (withPath path) | root createAndLoadXml {parameter value}

Function parameters:

  • parameter is the name of a parameter important for file creation. The value of this parameter is specified in the corresponding value parameter. parameter can be:
    • xmlBlob: the blob in XML format to be loaded into the version of the new file
    • name: the name the new file is to receive. A name is generated if none is specified.
  • value contains the value of the respective parameter.

Return value if successful: the ID of the new file (string)

Necessary permissions (CM only):

  • The user must have the permissionCreateChildren permission in the target folder.
  • The user must have the global file creation permission set in the format of the target file.

Example:

CM>obj root createAndLoadXml name news xmlBlob [obj withPath /olds releasedContent get xmlBlob]
news