4.2.1

Table Of Contents
Using the XML Plug-In 6
You can use the XML plug-in to run workflows that create and modify XML documents.
The XML plug-in adds an implementation of a Document Object Model (DOM) XML parser to the Orchestrator
JavaScript API. The XML plug-in also provides some sample workflows to demonstrate how you can create
and modify XML documents from workflows.
Alternatively, you can use the ECMAScript for XML (E4X) implementation in the Orchestrator JavaScript API
to process XML documents directly in JavaScript. For an E4X scripting example, see Developing with VMware
vCenter Orchestrator.
For information about E4X, go to the Web site of the organization that maintains the ECMA-357 standard.
This chapter includes the following topics:
n
“XML Plug-In Scripting API,” on page 51
n
“Running the XML Plug-In Sample Workflows,” on page 55
XML Plug-In Scripting API
The XML scripting API contains classes, with their respective attributes and methods, that allow vCenter
Orchestrator to manage XML documents. You can use the API to develop custom workflows.
XMLDocument Class
The XMLDocument class is the main XML class.
The XMLDocument class defines the following methods.
Method Returns Description
appendChild(XMLNode):Object Object
Adds a newChild node to the end of the
list of child nodes of this node. If the
newChild node exists in the tree, it is
first removed.
cloneNode(boolean):Object Object
Clones a node.
createCDATASection(Object):XMLN
ode
XMLNode
Creates a CDATA node.
createComment(String):XMLNode XMLNode
Creates a comment node.
createElement(String):XMLElemen
t
XMLElement
Creates an element with a given name.
createProcessingInstruction(Str
ing,String):XMLNode
XMLNode
Creates a ProcessingInstruction node
with specified name and data strings.
VMware, Inc. 51