Generates a string representation of the full XML name specified with the Namespace URI and Local Name according to the specified form.
Parameters:
form
The parameter may accept one of the three possible string values:
"qualified"
prefix:localName
"unqualified"
"full"
{namespaceURI}localName
When the parameter 'form'
is not specified, the
default XML name representation form will be used, which is set
with setXMLNameForm()
function.
This allows setting the form only once for all subsequent
toXMLName()
calls without passing it each time as the function parameter.
As the toXMLName()
function is used very frequently, this
simplifies programming and improves performance.
namespaceURI
localName
qName
qName.namespaceURI
and qName.localName
properties).
(For more details about QName
type, see below.)
Note: When this parameter is null
, the function
returns empty string.
contextElement
Note: This parameter will be used only when generating the qualified form.
contextElements
The function starts from the first element and uses it to resolve the namespace prefix.
If the element's context does not define the necessary namespace URI/prefix binding, the function tries the next element from the array/enumeration and repeats so until the binding found or the last element reached.
Note: This parameter will be used only when generating the qualified form.
'contextElement'
nor 'contextElements'
parameter is specified, the generator context element will be used by default.
Returns:
setXMLNameForm(), getXMLNameForm()