Application Programming Interface Guide > Built-in Procedures > Procedures Reference > DeleteElement
 
DeleteElement
Delete one or more element nodes from an XML document or element.
The XPath expression selects the nodes to delete. The XPath is evaluated against the root node. All resulting nodes are deleted.
The namespacePrefixes and namespaceURIs are used to resolve prefixes to namespaces in the parentXPath expression. Each item in namespacePrefixes must have a corresponding item in xpathNamespaces. The empty string specifies the default namespace.
Location
/lib/services/
Inputs
root: An XML document or element.
xpath: An XPath expression to evaluate against the root node to select the nodes to delete.
namespacePrefixes: An array of namespace prefixes used in the XPath expression. May be NULL.
namespaceURIs: An array of namespace URIs used in the XPath expression. May be NULL.
Outputs
envelope: The XML document or element.
Exceptions
IllegalArgumentException: If any of the arguments are invalid.