Class XmlUtils
Contains static methods and properties related to the xml documents handling.
public static class XmlUtils
- Inheritance
-
XmlUtils
Methods
- 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.
- 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.
- 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.