Click or drag to resize
XmlExtensionMethods Class
General class with extension methods for various types in the .NET library.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.ORMSupportClassesXmlExtensionMethods

Namespace: SD.LLBLGen.Pro.ORMSupportClasses
Assembly: SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.0.0.0 (5.0.0)
Syntax
public static class XmlExtensionMethods

The XmlExtensionMethods type exposes the following members.

Methods
  NameDescription
Public methodStatic memberGetMandatoryAttribute
Gets the mandatory attribute. if it's not found, an XmlException is thrown
Public methodStatic memberGetOptionalAttributeT(XmlReader, String, FuncString, T)
Gets the value of an optional attribute. If the attribute isn't present, string.Empty is returned.
Public methodStatic memberGetOptionalAttributeT(XmlReader, String, FuncString, T, T)
Gets the value of an optional attribute. If the attribute isn't present, defaultValue is returned.
Public methodStatic memberGetSubtreeReader
Gets a new subtree reader which is prepared and is positioned at the same node the passed in reader is on, so any subsequential read moves automatically to any subelements available
Public methodStatic memberPrepareReaderForFirstRead
Prepares the reader for first read. This means that if the reader is in the initial state, a Read is executed. If the first read then sees an XML declaration, it's skipped as well
Public methodStatic memberReadCDataElement
Reads a CData element. It assumes reader is positioned on the start element of the CData element
Public methodStatic memberReadElementAsObject
Reads the element the reader is currently positioned on as object. Expects format as written by WriteValueAsElement
Public methodStatic memberReadNext
Reads the next element. This routine is similar to Read() but it returns false on EOF and when reader is on an end element and the element isn't an empty element. Read() only returns false when it's hit EOF. Use this on a reader created with GetSubtreeReader.
Public methodStatic memberWriteCDataElement
Writes a new element to the writer with the element data in a CData block
Public methodStatic memberWriteElementWithAttribute
Writes a full element with the name specified and an additional attribute with the name and value specified.
Public methodStatic memberWriteOptionalAttributeStringT(XmlWriter, String, T)
Writes an optional attribute string. If attributeValue is equal to the default of T, no attribute is written.
Public methodStatic memberWriteOptionalAttributeStringT(XmlWriter, String, T, String)
Writes an optional attribute string. If attributeValue is equal to the default of T, no attribute is written.
Public methodStatic memberWriteOptionalAttributeStringT(XmlWriter, String, T, String, T)
Writes an optional attribute string. If attributeValue is equal to the default null value specified, no attribute is written.
Public methodStatic memberWriteOptionalElementStringT(XmlWriter, String, T)
Writes an optional element string. If elementValue is equal to the default of T, no element is written.
Public methodStatic memberWriteOptionalElementStringT(XmlWriter, String, T, String)
Writes an optional element string. If elementValue is equal to the default of T, no element is written.
Public methodStatic memberWriteOptionalElementStringT(XmlWriter, String, T, String, T)
Writes an optional element string. If elementValue is equal to the default null value specified, no element is written.
Public methodStatic memberWriteValueAsElement
Writes the value as element, with the type as attribute. If value is null, no type is written and the value is empty
Top
See Also