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.createNode()
This method creates an XML node from an XML object. It requires an existing XML object with a document element, but it does not update the existing XML object. The new method requires a rootname.
Syntax
XML.createNode( type, name, value );
Arguments
The following arguments are valid for this method:
Argument | Data type | Description |
---|---|---|
type
|
Integer | This argument specifies the XML DOM node type for the node you want the script to create. This method only accepts XML DOM types 1, 2, and 3. See the W3C Web site for a complete listing of XML DOM node-types by integer. |
name
|
String | This argument specifies the text string you want the script to add as the XML node name. 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 >). |
value
|
String | This argument specifies the text string you want the script to add as the XML node value. 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 create the node.
Example
This example creates an XML node from 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("document"); var NewNodeName; var NewNodeValue; var NewNodeType; XMLObject = XMLObject.setContent( "<document> </document>" ); function createNewNode( type, name, value, xmlSource ) { 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( "The XML source object remains unchanged: " + XMLObject ); print( "The new node converted to an XML string is: " + NewNode.toXMLString() ); print( "Applying the getName method to the new node produces: " + NewNode.getName() ); print( "Applying the getValue method on the new node produces: " + NewNode.getValue() ); } NewNodeType = 1; NewNodeName = "node"; NewNodeValue = "test"; createNewNode( NewNodeType, NewNodeName, NewNodeValue, XMLObject ); NewNodeType = 2; NewNodeName = "id"; NewNodeValue = "test"; createNewNode( NewNodeType, NewNodeName, NewNodeValue, XMLObject ); NewNodeType = 3; NewNodeName = null; NewNodeValue = "Text node"; createNewNode( NewNodeType, NewNodeName, NewNodeValue, XMLObject );