Class XmlMapCollection

XmlMapCollection class

A collection of XmlMap objects that represent XmlMap information.

public class XmlMapCollection : CollectionBase<XmlMap>

Properties

NameDescription
Capacity { get; set; }
Count { get; }
Item { get; }Gets the xml map by the specific index.
Item { get; set; }

Methods

NameDescription
Add(string)Add a XmlMap by the url/path of a xml/xsd file.
BinarySearch(XmlMap)
BinarySearch(XmlMap, IComparer<XmlMap>)
BinarySearch(int, int, XmlMap, IComparer<XmlMap>)
Clear()Removes all XmlMaps. (2 methods)
Contains(XmlMap)
CopyTo(XmlMap[])
CopyTo(XmlMap[], int)
CopyTo(int, XmlMap[], int, int)
Exists(Predicate<XmlMap>)
Find(Predicate<XmlMap>)
FindAll(Predicate<XmlMap>)
FindIndex(Predicate<XmlMap>)
FindIndex(int, Predicate<XmlMap>)
FindIndex(int, int, Predicate<XmlMap>)
FindLast(Predicate<XmlMap>)
FindLastIndex(Predicate<XmlMap>)
FindLastIndex(int, Predicate<XmlMap>)
FindLastIndex(int, int, Predicate<XmlMap>)
GetEnumerator()
IndexOf(XmlMap)
IndexOf(XmlMap, int)
IndexOf(XmlMap, int, int)
LastIndexOf(XmlMap)
LastIndexOf(XmlMap, int)
LastIndexOf(XmlMap, int, int)
RemoveAt(int)

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

    public class XmlMapCollectionDemo
    {
        public static void XmlMapCollectionExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();

            // Access the XmlMapCollection from the workbook
            XmlMapCollection xmlMaps = workbook.Worksheets.XmlMaps;

            // Add a new XmlMap to the collection
            int xmlMapIndex = xmlMaps.Add("XmlMapCollectionExample.xsd");

            // Access the newly added XmlMap
            XmlMap xmlMap = xmlMaps[xmlMapIndex];

            // Display the count of XmlMaps in the collection
            Console.WriteLine("Number of XmlMaps: " + xmlMaps.Count);

            // Set the capacity of the XmlMapCollection
            xmlMaps.Capacity = 10;

            // Clear all XmlMaps from the collection
            xmlMaps.Clear();

            // Save the workbook
            workbook.Save("XmlMapCollectionExample.xlsx");

            return;
        }
    }
}

See Also