TX Text Control .NET for WPF

XmlElementCollection Class

Class
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
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, IEnumerable

Examples

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.");

Members

Properties

PropertyDescription
CountGets the number of XML elements in the collection.

Methods

MethodDescription
AddAdds the specified XML element to the collection.
CopyToCopies the elements of the collection to an array, starting at a particular index.
GetEnumeratorReturns an enumerator that can be used to iterate through the collection.
GetItemReturns a particular XML element from the collection.
RemoveRemoves an XML element from an XML document.