XmlElementCollection Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXTextControl.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXTextControl.from the setup.dll
- Implements
- ICollection, IEnumerable
Description
An instance of this class contains all elements of an XML document that have the same element name. It can be obtained with the TextControl.GetXmlElements method.
Syntax
public class XmlElementCollection : ICollection, IEnumerablePublic Class XmlElementCollection
Implements ICollection, IEnumerableExamples
The following example includes the count value from a Xml Element Collection object in application diagnostics. The created object is then available to the surrounding document workflow.
Console.WriteLine($"Count: {xmlElementCollection.Count}");
Console.WriteLine("Xml Element Collection is ready for use.");Console.WriteLine($"Count: {xmlElementCollection.Count}")
Console.WriteLine("Xml Element Collection is ready for use.")Members
Properties
| Property | Description |
|---|---|
| Count | Gets the number of XML elements in the collection. |
Methods
| Method | Description |
|---|---|
| Add | Adds the specified XML element to the collection. |
| CopyTo | Copies the elements of the collection to an array, starting at a particular index. |
| GetEnumerator | Returns an enumerator that can be used to iterate through the collection. |
| GetItem | Returns a particular XML element from the collection. |
| Remove | Removes an XML element from an XML document. |