# GrapeCity.Documents.Word.CustomXmlPartCollection.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Word_CustomXmlPartCollection_Add_" data-uid="GrapeCity.Documents.Word.CustomXmlPartCollection.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Word_CustomXmlPartCollection_Add_" data-uid="GrapeCity.Documents.Word.CustomXmlPartCollection.Add*"></a>
<h4 id="GrapeCity_Documents_Word_CustomXmlPartCollection_Add_System_Xml_XmlDocument_System_String_System_String___System_String_" data-uid="GrapeCity.Documents.Word.CustomXmlPartCollection.Add(System.Xml.XmlDocument,System.String,System.String[],System.String)">Add(XmlDocument, string, string[], string)</h4>
<div class="markdown level1 summary"><p>Adds a new <a class="xref" href="GrapeCity.Documents.Word.CustomXmlPart.html">CustomXmlPart</a> into the collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public CustomXmlPart Add(XmlDocument xmlDocument, string id = null, string[] schemas = null, string contentType = &quot;application/xml&quot;)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(xmlDocument As XmlDocument, Optional id As String = Nothing, Optional schemas As String() = Nothing, Optional contentType As String = &quot;application/xml&quot;) As CustomXmlPart</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">XmlDocument</span></td>
      <td><span class="parametername">xmlDocument</span></td>
      <td><p>The <span class="xref">System.Xml.XmlDocument</span> that contains data for this part.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">id</span></td>
      <td><p>A globally unique identifier (GUID) that uniquely identifies this part in the document.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</td>
      <td><span class="parametername">schemas</span></td>
      <td><p>A list of XML schemes that are associated with the part.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">contentType</span></td>
      <td><p>The content type of the part.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.CustomXmlPart.html">CustomXmlPart</a></td>
      <td><p>A newly created <a class="xref" href="GrapeCity.Documents.Word.CustomXmlPart.html">CustomXmlPart</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
