selectNodes method
Function
Returns all nodes that match the pattern.
Basic syntax
objDocumentNodeList = (patternString);
illustrate
patternString is a string containing XSL styles. This method passes back to the node inventory object, containing the nodes that match the style. If there is no matching node, an empty list of manifests is passed back.
Example
objNodeList=("/");
alert((0).xml);
-------------------------------------------------------------------------------------
createNode method
Function
Create a new node with a specified pattern, name, and namespace.
Basic syntax
(type, name, nameSpaceURI);
illustrate
type is used to confirm the node type to be established, name is a string to confirm the name of the new node, and the namespace prefix is selective. nameSpaceURI is a string that defines the namespace URI. If the prefix is included in the name parameter, this node is created with the specified prefix in the text of nameSpaceURI. If the prefix is not included, the specified namespace is considered as a preset namespace.
Example
objNewNode = (1, "TO", "");
alert();
-------------------------------------------------------------------------------------
createProcessingInstruction method
Function
Create a new processing instruction that contains the specified target and data.
Basic syntax
(target, data);
illustrate
target is a string representing the target, name, or processing directive. Data is the value that represents the processing instruction. A new processing instruction is created, but is not added to the file tree. To add processing instructions to the file tree, insert methods must be used, such as insertBefore, replaceChild, or appendChild.
Example
objNewPI =(‘XML', ‘version="1.0"');
alert();
-------------------------------------------------------------------------------------
createTextNode method
Function
Create a new text node and contain the specified data.
Basic syntax
(data);
illustrate
data is a string representing the new text node. A new text node is created, but not added to the file tree. To add a node to the file tree, you must use an insert method, such as insertBefore, replaceChild, or appendChild.
Example
objNewTextNode = ("This is a text node.");
alert();
-------------------------------------------------------------------------------------
getElementsByTagName method
Function
Returns the set of elements with the specified name.
Basic syntax
objNodeList = (tagname);
illustrate
tagname is a string representing the found element volume name. Use tagname "*" to pass back all the found elements in the file.
Example
objNodeList = ("*");
alert((1).xml);
-------------------------------------------------------------------------------------
haschildnodes method
Function
If the specified node has one or more child nodes, the return value is true.
Basic syntax
boolValue = () ;
illustrate
If the node has children to pass back the value to true, otherwise the false value will be returned.
Example
boolValue = ();
alert(boolValue);
-------------------------------------------------------------------------------------
insertBefore method
Function
Insert a child node before the specified node.
Basic syntax
objDocumentNode = (newChild,refChild);
illustrate
newChild is an object containing the address of the new child node, and refChild is the address of the reference node. The new child node is inserted before the reference node. If the refChild parameter is not included, the new child node will be inserted at the end of the child node list.
Example
objRefNode = ;
alert();
objNewNode = ("This is a comment");
(objNewNode, objRefNode);
alert();
-------------------------------------------------------------------------------------
selectSingleNode Returns the first node that matches the style.
Function
Pass back to the first node that matches the style.
Basic syntax
objDocumentNode = (patternString);
illustrate
patternString is a string containing XSL styles. This method will return the first compliant node object, and if there is no compliant node, return null.
Example
objNode = ("EMAIL/BCC");
alert();
-------------------------------------------------------------------------------------
transformNode method
Function
Use the provided stylesheet to process the node and its children.
Basic syntax
strTransformedDocument = (stylesheet);
illustrate
stylesheet is an XML file or fragment containing XSL elements responsible for node conversion. This method returns a string containing the result of the conversion.
Example
var style = new ActiveXObject("");
("LstA_49.xsl");
strTransform = ();
alert(strTransform);