Table of Contents

Class XmlUtils

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains static methods and properties related to the xml documents handling.

public static class XmlUtils
Inheritance
XmlUtils

Fields

UIXmlNamespace

Gets uixml namespace uri.

Methods

AddPropertyNameOverrides(XmlAttributeOverrides, Type, params NameValue<string>[])

Creates XmlAttributeOverrides for use with XmlSerializer.

ConvertXml(Stream, XmlStreamConvertParams)

Converts xml data using the specified parameters.

CreateWriter(StringBuilder, XmlWriterSettings?)

Creates XmlWriter using the specified StringBuilder and optional XmlWriterSettings.

DeserializeFromFile<T>(string)

Deserializes object from the specified file.

DeserializeFromString<T>(string)

Deserializes object from the specified string with xml data.

Deserialize<T>(Stream)

Deserializes object from the specified stream.

Deserialize<T>(string)

Deserializes object from the specified file without throwing exceptions.

ForEachChild(XmlDocument, Func<XmlNode, object?, bool>?, object?)

Calls specified action for the each child node of the xml document. Root node is ignored.

GetAttrValue(XmlNode, string)

Gets attribute value of the specified XmlNode.

GetAttributes(XmlNode)

Gets node attributes as an array of XmlAttribute.

HasAttr(XmlNode, string)

Gets whether attribute with the specified name exists.

IndentXml(string, bool)

Makes string with xml data indented.

Load(XmlDocument, Stream)

Loads xml document from the specified stream.

RemoveAttr(XmlNode, string)

Removes attribute if it exists.

Save(StringBuilder, Stream)

Saves StringBuilder to the specified stream using UTF8 format.

Save(XmlDocument, Stream, XmlWriterSettings?)

Saves xml document to stream using the specified settings.

SaveIndented(XmlDocument, Stream)

Saves xml document to stream with pretty indentation.

SerializeObject(TextWriter, object)

Serializes object to the specified TextWriter.

SerializeObjectToFile(string, object, Encoding?)

Serializes object to the specified file.

SerializeObjectToStream(Stream, object, Encoding?)

Serializes object to the specified stream.

SerializeToFile<T>(string, T)

Serializes object to the specified file.

Serialize<T>(TextWriter, T)

Serializes object to the specified TextWriter.

Serialize<T>(string, T)

Serializes object to the specified file without throwing exceptions.