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.getQualifiedName()
This method returns a string representing the name of the current element or attribute, including any namespace value. You must use the other XML get methods to navigate through an XML document.
Syntax
XML.getQualifiedName();
Arguments
There are no arguments for this method.
Return values
A string or null
.
The method returns a string representing the name of the current element or attribute. It returns null
if the current node has no name.
Example
This example displays the qualified names of the elements and attributes in an XML document.
This example requires the following sample data:
- A local XML file (for example, C:\namespace.xml which contains
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><document xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns="http://servicemanager.hp.com/PWS"><http:element1 /><ns:element2 /></document>
)
/* Create variables to store XML objects and strings. * Use XMLObject to store a valid XML object such as an XML file. * The script assigns values to the empty variables later on */ var XMLFile = new XML(); XMLFile = XMLFile.setContent( "C:\\namespace.xml", true ); var XMLSource; function nsXMLWalk( elem ) { print( "Element " + elem.getQualifiedName() ); var node = elem.getFirstAttribute(); while( node != null ) { var attrName = node.getQualifiedName(); var attrValue = node.getNodeValue(); print( "Attribute " + attrName + " = " + attrValue ); node = elem.getNextAttribute(); } var nodeValue = elem.getNodeValue(); if ( typeof nodeValue == "string" && nodeValue.length > 0 ) { print( "Element value of " + elem.getQualifiedName() + " is: " + nodeValue ); } var child = elem.getFirstChildElement(); while( child != null ) { var nodeName = child.getQualifiedName(); var nodeValue = child.getNodeValue(); nsXMLWalk( child ); child = child.getNextSiblingElement(); } } function walkXML( elem ) { print( "Element " + elem.getName() ); var node = elem.getFirstAttribute(); while( node != null ) { var attrName = node.getName(); var attrValue = node.getNodeValue(); print( "Attribute " + attrName + " = " + attrValue ); node = elem.getNextAttribute(); } var nodeValue = elem.getNodeValue(); if ( typeof nodeValue == "string" && nodeValue.length > 0 ) { print( "Element value of " + elem.getName() + " is: " + nodeValue ); } var child = elem.getFirstChildElement(); while( child != null ) { var nodeName = child.getName(); var nodeValue = child.getNodeValue(); walkXML( child ); child = child.getNextSiblingElement(); } } print( "Now printing the structure of an XML file with qualified names...\n" ); XMLSource = XMLFile nsXMLWalk( XMLSource ); print( "Now printing the structure of an XML file without qualified names...\n" ); XMLSource = XMLFile walkXML( XMLSource );
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: