Summary of ECMAScript Language Extensions
This topic lists the operators, functions and keywords you can use within ECMAScript files in WebLogic Workshop projects.
Operator |
Description |
---|---|
.@ |
Provides access to attributes belonging to the element on the left side of the operator. See Accessing Attributes With the .@ Operator. |
[] |
Provides access to an element child using an index corresponding to its position in document order. See Accessing Element Children Through Their Index. |
:: |
Used with a namespace variable, :: can be used to access elements within a specified namespace. See Filtering By Namespace. |
{} |
Provides a way to specify an ECMAScript expression with which to substitute for values in XML. See Resolving XML Dynamically with Embedded Expressions. |
. |
Provides access to immediate child elements contained by the element on left side of the operator. See Accessing Element Children With the . Operator. |
.. |
Provides access to any child element contained by the element on the left of the operator. See Accessing Element Descendants With the .. Operator. |
< |
Specifies that what follows should be interpreted as XML when assigned to an XML variable. See Creating and Using XML Variables. |
.() |
Filters a list of element children using a specified value. See Filtering Multiple Children With Predicates. |
+ |
Combines XML to create a new XMLList or to add new values to existing XML. See Combining XML With the + Operator. |
+= |
Inserts an XML element after another element. See Inserting Elements With the += Operator. |
delete |
Removes elements and attributes from XML. See Removing Elements and Attributes With the delete Operator. |
import |
Imports Java classes for used in ECMAScript. See Importing Java Classes to ECMAScript with the import Statement. |
namespace |
Declares a namespace variable, which you can use to access namespaced elements. See Filtering By Namespace. |
thisXML |
Specifies the current XML, such as XML returned from a nested expression. See Specifying the Current XML with the thisXML Keyword. |
Note For more complete descriptions and examples, see Functions for Manipulating XML.
Function |
Description |
---|---|
xmlElement.appendChild(newChild) |
Inserts a new child node after the existing children of the XML value. |
xmlElement.attribute(attributeName) |
Returns the value of the specified attribute. |
xmlElement.attributes() |
Returns a list of attributes for the specified element. |
xmlElement.child(childIndex) |
Returns the XML at the 0-based ordinal position specified by childIndex. |
xmlElement.childIndex() |
Returns the 0-based ordinal position of the XML value within its parent. |
xmlElement.children() |
Returns a list of the element's children. |
xmlElement.copy() |
Returns a copy of the specified element. |
xmlElement.domNode() |
Returns a org.w3c.dom.Node representation of xmlElement. |
xmlElement.innerXML(newContent) |
Replaces the entire contents of the XML value with new content. |
xmlElement.length |
Returns the length of a list XML elements. |
xmlElement.namespaceURI() |
Returns a string representing the namespace URI associated with xmlElement. |
xmlElement.parent() |
Returns the parent of the element. |
xmlElement.prependChild(newChild) |
Inserts a new child node before the existing children of the XML value. |
xmlElement.tagName() |
Returns the name of the element tag. |
xmlElement.thisXML |
Specifies the current XML, such as XML returned from an expression. |
xmlElement.text() |
Returns a string containing the value of all XML properties of xmlElement that are of type string. |
xmlElement.toString() |
Returns the element and its content as a string. |
xmlElement.toXMLString() |
Returns an XML encoded string representation of xmlElement. |
xmlElement.xpath(xPathExpression) |
Evaluates the XPath expression using the XML value as the context node. |