Table of Contents

Class XmlDocument

Namespace: FastReport.Olap.Utils
Assembly: FastCube.Core.dll

Represents a xml document that contains the root xml node.

public class XmlDocument

Inheritance

objectXmlDocument

Remarks

Use Load and Save methods to load/save the document. To access the root node of the document, use the FastReport.Olap.Utils.XmlDocument.Root property.

Constructors

XmlDocument()

Initializes a new instance of the XmlDocument class with default settings.

public XmlDocument()

Properties

AutoIndent

Gets or sets a value indicating whether is necessary to indent the document when saving it to a file/stream.

public bool AutoIndent { get; set; }

Property Value

bool

Encoding

Gets or sets a file encoding

public Encoding Encoding { get; set; }

Property Value

Encoding

Root

Gets the root node of the document.

public XmlItem Root { get; }

Property Value

XmlItem

WriteHeader

Gets or sets a value indicating whether is necessary to add xml header.

public bool WriteHeader { get; set; }

Property Value

bool

Methods

Clear()

Clears the document.

public void Clear()

Dispose()

Disposes resources used by the document.

public void Dispose()

Load(Stream, bool)

Loads the document from a stream.

public void Load(Stream stream, bool detectEncoding = false)

Parameters

stream Stream

Stream to load from.

detectEncoding bool

Load(string, bool)

Loads the document from a file.

public void Load(string fileName, bool detectEncoding = false)

Parameters

fileName string

The name of file to load from.

detectEncoding bool

Save(Stream)

Saves the document to a stream.

public void Save(Stream stream)

Parameters

stream Stream

Stream to save to.

Save(TextWriter)

Saves the document to a string.

public void Save(TextWriter textWriter)

Parameters

textWriter TextWriter

Writer to save to.

Save(string)

Saves the document to a file.

public void Save(string fileName)

Parameters

fileName string

The name of file to save to.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.