Loading XML????

  • Thread starter Thread starter Chuck Hecht
  • Start date Start date
C

Chuck Hecht

Hello,

I am loading 12 xml files (along with 12 xsd files) to a symbol 8846
pda. I am loading the xml into a dataset, dsTraker.
I would appreiate any comments, ideas or suggstions that would make
this as effiecent as possible.
I do have some control over the size of the xml files but not as much
as I would like so I am concerned over speed.

Thanks

chuck

'***scustomers**
xmlpath = "\my documents\scustomers.xml"
xsdpath = "\my documents\scustomers.xsd"
Dim fs_xsd_scustomers As New FileStream(xsdpath, FileMode.Open)
Dim xr_xsd_scustomers As New XmlTextReader(fs_xsd_scustomers)
Dim fs_xml_scustomers As New FileStream(xmlpath, FileMode.Open)
Dim xr_xml_scustomers As New XmlTextReader(fs_xml_scustomers)
frmMain.pbDataSource.Value = 20
frmMain.pbDataSource.Refresh()
frmMain.lblStatus.Text = "Loading Customers"
frmMain.lblStatus.Refresh()
frmMain.Update()
dsTraker.ReadXmlSchema(xr_xsd_scustomers)
dsTraker.ReadXml(xr_xml_scustomers)
fs_xsd_scustomers = Nothing
xr_xsd_scustomers = Nothing
fs_xml_scustomers = Nothing
xr_xml_scustomers = Nothing
 
You might find serializing the Xml to a object will give you better
performance than the DataSet.

Do a google on this, there are plenty of discussions on the subject/debate.

Regards
Simon.
 
Back
Top