Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- JavaScript object: XML
- JavaScript method: XML.addAttribute()
- JavaScript method: XML.addElement()
- JavaScript method: XML.appendNode()
- JavaScript method: XML.createNode()
- JavaScript method: XML.getAttributeNode()
- JavaScript method: XML.getAttributeValue()
- JavaScript method: XML.getDocumentElement()
- JavaScript method: XML.getFirstAttribute()
- JavaScript method: XML.getFirstChildElement()
- JavaScript method: XML.getName()
- JavaScript method: XML.getNextAttribute()
- JavaScript method: XML.getNextSiblingElement()
- JavaScript method: XML.getNodeName()
- JavaScript method: XML.getNodeType()
- JavaScript method: XML.getNodeValue()
- JavaScript method: XML.getParentNode()
- JavaScript method: XML.getPrefix()
- JavaScript method: XML.getQualifiedName()
- JavaScript method: XML.getText()
- JavaScript method: XML.getValue()
- JavaScript method: XML.importNode()
- JavaScript method: XML.isDocumentElement()
- JavaScript method: XML.removeAttribute()
- JavaScript method: XML.setAttributeValue()
- JavaScript method: XML.setContent()
- JavaScript method: XML.setNodeValue()
- JavaScript method: XML.setText()
- JavaScript method: XML.setValue()
- JavaScript method: XML.toXMLString()
- JavaScript method: XMLDoc.insertBefore()
JavaScript method: XML.appendNode()
This method inserts an XML node into an XML object. There must be an existing XML object with a document element. This method does not update the existing XML object.
Syntax
XML.appendNode( name );
Arguments
The following arguments are valid for this method:
Argument | Data type | Description |
---|---|---|
name
|
String | This argument specifies the XML node name you want to append to the target XML object. The string argument must contain characters valid for XML (for example, the string cannot include the characters < or > except as XML entities such as < and >). |
Return values
An XML object or null
.
The method returns an XML object containing the new node or returns null
if the method cannot append the node to the current target node.
Example
This example appends an XML node to an XML source object.
This example requires the following sample data:
- An XML object (for example, an object containing "<document> </document>")
var XMLObject = new XML; var NewNodeName; var NewNodeValue; var NewNodeType; var TargetNode; XMLObject = XMLObject.setContent( "<document> </document>" ); function findTargetElement( node, targetElem ) { var topNodeName = node.getNodeName(); while (node != null && node.getNodeName() != targetElem ) { var childNode = node.getFirstChildElement(); if (childNode == null) { childNode = node.getNextSiblingElement(); while (childNode == null) { node = node.getParentNode(); if ( node == null || topNodeName == node.getNodeName() ) { return null; } childNode = node.getNextSiblingElement(); } node = childNode; } else { node = childNode; } } return node; } function appendNewNode( type, name, value, xmlSource, target ) { print( "The XML source object is: " + xmlSource); print( "Creating node of type: " + type + " named: " + name + " with value: " + value ); var NewNode = xmlSource.createNode( type, name, value ); print( "Appending " + NewNode.toXMLString() + " to: " + target ); var FoundNode = findTargetElement( xmlSource, target ); var appendedNode = FoundNode.appendNode( NewNode ); print( "The new XML object is: " + xmlSource ); } NewNodeType = 1; NewNodeName = "node"; NewNodeValue = "test"; TargetNode = "document"; appendNewNode( NewNodeType, NewNodeName, NewNodeValue, XMLObject, TargetNode );
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to docs.feedback@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: