Similar Threads:
1.Reading / Writing XML files?
Maybe I'm researching this too much... ? But after all this reading, I'm
still not sure if reading from and writing to XML files is feasible with
Compact Framework development (VB.net).
I have developed a PPC app that communicates through a SQLserver. However,
now the spec requires that we give the operators an option to send/receive
that same data via XML files for remote locations. The XML files might even
be placed on diskette and mailed to and from the host system location.
I'm reading that XML is supported, that it isn't supported and that its
partially supported in the compact framework. Which is true??
At this point, it doesn't look like I'll have any control over the XML file
specs. But if I did (or do), are there any specs that I should make sure we
stick by? I'm asking this after reading about integrated schemas, separate
schemas, etc.
Does the compact framework (or even with the use of OpenNetCF) accommodate
building and reading XML files?
Thanks.
2.Why read/write properties for XmlSerialization
Hello,
I have a question about XmlSerialization. I have a class with a private
field called createDate of the type DateTime. In the constructor of my class
I use DateTime. Now to create a timestamp that is assigned to the field
createDate. Because I want to encapsulate as much as possible of my class
data and don't want clients of my class to change the createDate but only
read it, I encapsulate the createDate field with a get Property. Now I want
this class to be the return type of a WebService I created and I want
consumers of my WebService to be able to read the createDate from the Xml
response from the WebService, so I added the XmlElementAttribute attribute to
my CreateDate property. The problem I run into is described on MSDN for the
XmlElementAttribute:
"Apply the XmlElementAttribute to public fields or public read/write
properties to control characteristics of the XML elements such as the element
name and namespace."
So, either the field needs to be public or my property needs to be a
read/write property. I think public fields are a bad practice in general, and
by adding a set method to my CreateDate property, I am opening up my class
more than I want to: clients of my class are now able to set the CreateDate
which I do not want them to be able to.
I hope you understand my problem here. Why should the XmlElementAttribute be
applied to read/write properties only and not to read properties? And what is
the best practice for this situation? I do want the createDate to be in the
Xml result of my WebService, but I don't want clients of my class to be able
to set the createDate.
3.Use XML to read/write a counter variable
Hi,
I am an old vb6 programmer and new to ASP.NET. Please help me on the way.
How can I read/write a variable to a server-file. (maybe XML?) Have to use a
lock function too i think.
Thanks,
Gert
4.XML -best method to read/write in NETcf??
I'm trying to use XML to send data to / from a scanner (ppc). Our current
vb netcf app connects directly with the sqlserver - however some scanners
have no network access and the SQLserver is in another location - the host
application developers are asking us to give the scanners options to
import/export data via xml files - the xml files will be sent via archaic
means. They are letting us spec the xml files.
For XML being THE thing, it sure is proving to be a pain getting this all
working. Basically, I our netcf app is working under this scenario:
To receive data from sql server into ppc
(SQLserver data)->SQLStoredProcedure -->PPCdataset->SQLceDB
To send updated data from ppc into sql server
SQLceDB--> SQLStoredProcedure->(SQLserver data)
Similarly I need to remove the stored procedure call and replace it with XML
import/exports.
Receive data from xml into ppc
XMLfile -->PPCdataset->SQLceDB
Send updated data from ppc into xml
SQLceDB--> XMLfile
I have been able to do a test by reading the sql server data into a dataset
via the stored procedure (using a data adapter) - and then writing that out
to XML [ ds.WriteXml("test.xml") ]
Ok, that gave me a test XML file to play with - but I can't even read that
XML file in to a dataset now. Trying to use:
Dim XMLreader as New XmlTextReader(New StreamReader("test.xml")
dsXML.ReadXmlSchema(XMLreader)
dsXML.ReadXml(XMLreader)
Are there any sample programs out there that contain a sample XML file that
gets read into a dataset, and then maybe even exports an xml file containing
modified data?
I'm trying to do my homework - but dang. It just seems that if XML is the
thing these days, it would be easier than this. Flat ascii files are sure
easier and even make more sense to the naked eye. ??
Thanks for any guidance.
5.XML file that is read/written to disappears from server -- help wanted
6. Reading/Writing XML Datasource...
7. Read/write simple XML
8. xml file read write question