System.Xml.XmlAttributeCollection.InsertBefore Method

Inserts the specified attribute immediately before the specified reference attribute.

Syntax

public XmlAttribute InsertBefore (XmlAttribute newNode, XmlAttribute refNode)

Parameters

newNode
The System.Xml.XmlAttribute to insert.
refNode
The System.Xml.XmlAttribute that is the reference attribute. newNode is placed before the refNode.

Returns

The XmlAttribute to insert into the collection.

Remarks

If an attribute with the same name is already present in the collection, the original attribute is removed from the collection and newNode is inserted into the collection. If refNode is null, newNode is inserted at the end of the collection.

This method is a Microsoft extension to the Document Object Model (DOM).

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0