Dim xdoc As XDocument = Nothing Dim xEle As XElement = Nothing Dim xNode As XElement = Nothing 'create new document xdoc = New XDocument 'add root xEle = New XElement("CurrentJobs") xdoc.Add(xEle) 'add jobs For Each job As JobBoard In Jobs xNode = New XElement("Job") xNode.Add(New XElement("CustomerName", job.JobName)) xNode.Add(New XElement("PurchaseOrder", job.JobName)) xEle.Add(xNode) Next xdoc.Save(jFileName)
status="a-current"
<?xml version="1.0" encoding="utf-8"?> <CurrentJobs> <Job status="a-current"> <CustomerName>St Michael</CustomerName> <PurchaseOrder></PurchaseOrder> </Job
xNode.Add(New XAttribute("status", "a-current"))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)