XmlExtensionMethods Class |
Namespace: SD.LLBLGen.Pro.ORMSupportClasses
The XmlExtensionMethods type exposes the following members.
Name | Description | |
---|---|---|
GetMandatoryAttribute |
Gets the mandatory attribute. if it's not found, an XmlException is thrown
| |
GetOptionalAttributeT(XmlReader, String, FuncString, T) |
Gets the value of an optional attribute. If the attribute isn't present, string.Empty is returned.
| |
GetOptionalAttributeT(XmlReader, String, FuncString, T, T) |
Gets the value of an optional attribute. If the attribute isn't present, defaultValue is returned.
| |
GetSubtreeReader |
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
| |
PrepareReaderForFirstRead |
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
| |
ReadCDataElement |
Reads a CData element. It assumes reader is positioned on the start element of the CData element
| |
ReadElementAsObject |
Reads the element the reader is currently positioned on as object. Expects format as written by WriteValueAsElement
| |
ReadNext |
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.
| |
WriteCDataElement |
Writes a new element to the writer with the element data in a CData block
| |
WriteElementWithAttribute |
Writes a full element with the name specified and an additional attribute with the name and value specified.
| |
WriteOptionalAttributeStringT(XmlWriter, String, T) |
Writes an optional attribute string. If attributeValue is equal to the default of T, no attribute is written.
| |
WriteOptionalAttributeStringT(XmlWriter, String, T, String) |
Writes an optional attribute string. If attributeValue is equal to the default of T, no attribute is written.
| |
WriteOptionalAttributeStringT(XmlWriter, String, T, String, T) |
Writes an optional attribute string. If attributeValue is equal to the default null value specified, no attribute is written.
| |
WriteOptionalElementStringT(XmlWriter, String, T) |
Writes an optional element string. If elementValue is equal to the default of T, no element is written.
| |
WriteOptionalElementStringT(XmlWriter, String, T, String) |
Writes an optional element string. If elementValue is equal to the default of T, no element is written.
| |
WriteOptionalElementStringT(XmlWriter, String, T, String, T) |
Writes an optional element string. If elementValue is equal to the default null value specified, no element is written.
| |
WriteValueAsElement |
Writes the value as element, with the type as attribute. If value is null, no type is written and the value is empty
|