Sample xml functional
From Agility
<?xml version="1.0" encoding="utf-8"?>
<export>
<configuration>
<separator>;</separator>
<textquote>"</textquote>
<newline>\r\n</newline>
<encoding>UTF8</encoding>
</configuration>
<contents>
<variable name="ns">XNamespace("http://getagility.com/jobtask")</variable>
<variable name="xmlJobList">
XElement(
"JobList",
XAttribute(Xmlns() + "task", #ns)
)</variable>
<foreach table="woJob" datacontext="dataset" classname="DataBO.ProcessMngt.JobBO">
<dbfilter>woJob.StartDate >= DATEADD(NOW(), 'MONTH', -6) order by woJob.StartDate</dbfilter>
<variable name="xmlJobTask">XElement(#ns + "JobTask")</variable>
<data>
(#xmlJobList).Add(
XElement("woJob",
XElement("JobCode", JobCode),
XElement("Description", FullDescription),
XElement("StartDate", StartDate),
XElement("JobStatus", DueDate),
#xmlJobTask
)
)
</data>
<foreach table="woJobTask">
<data>
(#xmlJobTask).Add(
XElement("TaskCode", Code),
XElement("Description", Description),
XElement("TaskType", syTaskType.Code),
XElement("TaskStatus", syJobStatus.Description)
)
</data>
</foreach>
</foreach>
<const>
XDocument(#xmlJobList)
</const>
</contents>
</export>