XmlDocRepository.ResolveIncludes Method

Namespace
Kampute.DocToolkit.XmlDoc
Assembly
  • Kampute.DocToolkit.dll

Definition

Resolves include elements in the specified XML document by importing content from external files.
public virtual void ResolveIncludes(XDocument document, string includeDir)

Parameters

document XDocument
The XML document to resolve its include elements.
includeDir string
The directory to search for the included files.

Exceptions

ArgumentNullException
Thrown when document or includeDir is null.
FileNotFoundException
Thrown when an included file is not found and no error handler is provided.

Remarks

Each include element is replaced by all the elements that the XPath expression of its path attribute selects from the file named by its file attribute, in document order.