## XmlDocument::GetElementById method


Returns the [XmlElement](../../xmlelement/) with the specified ID.

```cpp
virtual SharedPtr<XmlElement> System::Xml::XmlDocument::GetElementById(String elementId)
```


| Parameter | Type | Description |
| --- | --- | --- |
| elementId | String | The attribute ID to match. |

### ReturnValue

The [XmlElement](../../xmlelement/) with the matching ID or **nullptr** if no matching element is found.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XmlElement](../../xmlelement/)
* Class [String](../../../system/string/)
* Class [XmlDocument](../)
* Namespace [System::Xml](../../)
* Library [Aspose.PDF for C++](../../../)
