Writing subset of data to local XML file (sp1)

R

RickH

When my form is complete, I email it using a custom function. At the same
time, I want to append a subset of the data to a local XML file.
First part is easy:
Dim XMLFilePath As String = "C:\Program Files\InfoPath Form
Templates\Data.xml"
Dim xmldoc As New System.Xml.XmlDocument
Dim mainnode As Xml.XmlNode
Dim mainlist As System.Xml.XmlNodeList
xmldoc.load(XMLFilePath)

At this point, I am lost--no idea what I am doing---tried this next code,
which doesn't work..


mainlist = xmldoc.getElementsByTagName("FuelConsumption")
mainnode = mainlist.Item(0)
Dim docFrag As Xml.XmlDocumentFragment = xmldoc.CreateDocumentFragment()
docFrag.InnerXml.Concat(thisXDocument.DOM.selectSingleNode _
("/descendant::my:FacilityID") , _
thisXDocument.DOM.selectSingleNode _
("/descendant::my:DateFuelReceived") )
'shortened list....

mainnode.appendChild(docFrag)

Anyone have any ideas???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top