ClassXmlDocumentHelper
Provides helper methods for working with XML documents in the DrawingML context.
Definition
Namespace:Telerik.Windows.Documents.DrawingML
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public static class XmlDocumentHelper
Inheritance: objectXmlDocumentHelper
Methods
ReadNullableAttribute<T>(XmlAttribute, Func<string, T>)
Reads a nullable attribute from an XML attribute and converts it to the specified type using the provided conversion function.
Declaration
public static T? ReadNullableAttribute<T>(XmlAttribute attribute, Func<string, T> converter) where T : struct
Parameters
attribute
XmlAttribute
The XML attribute to read the value from.
converter
A function used to convert the attribute's string value to the specified type.
Returns
T?
An object of type T representing the converted value if the attribute has a valid value; otherwise, null.
ReadNullableBoolAttribute(XmlAttribute)
Reads a nullable boolean attribute from the provided XML attribute.
Declaration
public static bool? ReadNullableBoolAttribute(XmlAttribute attribute)
Parameters
attribute
XmlAttribute
The XML attribute to read the nullable boolean value from.
Returns
bool?
A nullable boolean representing the value of the attribute. Returns true if the attribute value is "true", false if the attribute value is "false", and null if the attribute is not present or has an invalid value.
ReadNullableLongAttribute(XmlAttribute)
Reads a nullable long attribute from the specified XML attribute.
Declaration
public static long? ReadNullableLongAttribute(XmlAttribute attribute)
Parameters
attribute
XmlAttribute
The XML attribute from which to read the nullable long value.
Returns
long?
Returns the long value represented by the XML attribute if it exists and is valid; otherwise, returns null.