Removes an attribute with the specified name contained in the specified element.
For the real XML element, the function calls directly the W3C DOM method:
Any error raised by this method will be reported by the function.org.w3c.dom.Element.removeAttribute()
For all pseudo-element, except those of #STUB
type,
the function does nothing and only returns the attribute value.
(See also DSMElement.pseudoElement
property.)
You may use this function when you need to alter an XML document
dynamically in memory after it has been loaded from the file.
See also loadXMLDocument()
function.
Note: Removing the attribute with
'xmlns'
name or whose name starts with
'xmlns:'
prefix will alter the list of
the namespace bindings associated with this element known to DocFlex.
For instance, this will be reflected in the list of values returned
by '#DOCUMENT/@namespaces'
attribute.
Also, removing the 'xmlns'
attribute will reset
the default namespace assumed by DocFlex within that element.
(The new default namespace will be that inherited by the element
from its parent.)
Parameters:
element
The element whose attribute is removed.
If not specified, the generator context element is assumed,
i.e. the same as the
call: removeXMLAttribute(contextElement,attrName)
attrName
The attribute name.
Returns:
The previous value of the attribute or an empty string if the element contained no attribute with the given name.
See Also:
setXMLAttribute(), hasXMLAttribute(),
getXMLAttribute(), loadXMLDocument()