FillContent() public method

public FillContent ( System.Xml.Linq.XElement content, Content data ) : ProcessResult
content System.Xml.Linq.XElement
data Content
return ProcessResult
		public TemplateProcessor FillContent(Content content)
		{
			var processor = new ContentProcessor(
				new ProcessContext(_wordDocument))
				.SetRemoveContentControls(_isNeedToRemoveContentControls);

			var processResult = processor.FillContent(Document.Root.Element(W.body), content);

			if (_wordDocument.HasFooters)
			{
				foreach (var footer in _wordDocument.FooterParts.Values)
				{
					var footerProcessResult = processor.FillContent(footer.Element(W.footer), content);
					processResult.Merge(footerProcessResult);
				}
			}

			if (_wordDocument.HasHeaders)
			{
				foreach (var header in _wordDocument.HeaderParts.Values)
				{
					var headerProcessResult = processor.FillContent(header.Element(W.header), content);
					processResult.Merge(headerProcessResult);
				}
			}
			
			if (_isNeedToNoticeAboutErrors)
				AddErrors(processResult.Errors);

            return this;
        }