Share via


removeAttribute Method (Compact 2013)

3/26/2014

Removes or replaces the named attribute.

Syntax

oXMLDOMElement.removeAttribute(name);
HRESULT removeAttribute(
  BSTR name
);

Parameters

Script

  • name
    String specifying the name of the attribute to be removed or replaced.

C/C++

  • name
    [in] Name of the attribute to be removed or replaced.

Return Value

Script

None.

C/C++

  • S_OK
    Value returned if successful.
  • S_FALSE
    Value returned when no attribute with the given name is found.
  • E_FAIL
    Value returned if an error occurs.

Remarks

If the specified attribute has a default value, this is equivalent to a replace operation: The current value is removed and a new attribute is created with the default value. This operation also resets the specified Property of IXMLDOMNode.

This method applies to the following objects and interfaces:

IXMLDOMElement and IXMLDOMNode.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML DOM Methods