Skip to main content
A newer version of this page is available. .

RecurrenceInfoXmlPersistenceHelper.CreateObjectXmlLoader(XmlNode) Method

Creates an object that enables you to load recurrence info from xml.

Namespace: DevExpress.XtraScheduler.Xml

Assembly: DevExpress.XtraScheduler.v18.2.Core.dll

Declaration

public override ObjectXmlLoader CreateObjectXmlLoader(
    XmlNode root
)

Parameters

Name Type Description
root XmlNode

An XmlNode representing the node containing recurrence information.

Returns

Type Description
DevExpress.Utils.Serializing.ObjectXmlLoader

A DevExpress.XtraScheduler.Xml.RecurrenceInfoXmlLoader object that is the descendant of the DevExpress.XtraScheduler.Xml.ObjectXmlLoader class.

Remarks

The following code snippet illustrates the use of the CreateObjectXmlLoader method to create a RecurrenceInfo instance from xml markup. The picture shows the recurrence form for the appointment with recurrence information identical to that used in code.

XmlLoader

using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.Xml;
using System.Xml;
// ...
string s = @"<RecurrenceInfo 
    Start=""07/05/2010 16:30:00""
    End=""08/01/2010 00:00:00"" 
    WeekDays=""62"" 
    Id=""975889a8-ea37-4625-a1ec-0fb2806199e2"" 
    Month=""12"" OccurrenceCount=""20"" Range=""2"" Type=""1"" />";

XmlDocument xmlDocumentObject = new XmlDocument();
xmlDocumentObject.LoadXml(s);
XmlNode node = xmlDocumentObject.FirstChild;

RecurrenceInfo ri = new RecurrenceInfo();
RecurrenceInfoXmlPersistenceHelper helper = 
    new RecurrenceInfoXmlPersistenceHelper(ri, DateSavingType.UTC);
RecurrenceInfoXmlLoader recur_XML_loader = 
    (RecurrenceInfoXmlLoader)helper.CreateObjectXmlLoader(node);
ri = (RecurrenceInfo)recur_XML_loader.ObjectFromXml();
See Also