## XmlMapCollection.Add method

添加一个[`XmlMap`](../../xmlmap)通过 xml/xsd 文件的 url/路径。

```csharp
public int Add(string url)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| url | String | xml/xsd 文件的 url/路径。 |

### 返回值

[`XmlMap`](../../xmlmap)对象索引。

### 例子

下面的代码增加了两个[`XmlMap`](../../xmlmap)通过一个 xsd 文件和一个 xml 文件。

```csharp
Workbook wb = new Workbook();

XmlMapCollection xmlMapCollection = wb.Worksheets.XmlMaps;

//通过xsd文件添加一个<see cref="T:Aspose.Cells.XmlMap" />。
xmlMapCollection.Add("schema.xsd");

//通过xml文件添加一个<see cref="T:Aspose.Cells.XmlMap" />。
xmlMapCollection.Add("xml.xml");

wb.Save("twoXmlMaps.xlsx");
```

### 也可以看看

* class [XmlMapCollection](../../xmlmapcollection)
* 命名空间 [Aspose.Cells](../../xmlmapcollection)
* 部件 [Aspose.Cells](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
