Mono Class Library: System.Xml.XmlDocument Overview | MembersSystem.Xml.XmlDocument.GetElementById Method |
Returns an System.Xml.XmlElement node whose ID matches the argument string. [Edit]
|
- elementId
- An ID string to identify the target element. [Edit]
An System.Xml.XmlElement instance that matches the argument ID, or null if there is no such element. [Edit]
This method tries to find an element whose ID is equivalent to the argument string. ID is assigned only when the element has corresponding attribute whose type is ID. If there is no such element, then this method returns null.
The type of an attribute is assumed from its XmlDocument.DocumentType definition. Note that the name of an attribute is nothing to do with the type. The type of attribute whose name is "id" is not ID unless it is explicitly defined.
[Edit]
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0