using XML to transmit data between classes

  • Thread starter Thread starter Vaughn
  • Start date Start date
V

Vaughn

Where can I find information on writing data in XML format? I'm working on a
Win application and I'd like to be able to receive all the data that's
displayed in my application in XML-format so I can use it in a Web app in
the future. My goal would be to manually "convert" the data to xml and then
send it to the form. Then the form would need to convert this data into
readable information so it can be displayed. When passing information in
XML, do I need to phydically create a file with the information? Or can it
all be stored in memory? Since it's secure information, we don't want to
leave xml ascii files with data.

Thanks.
 
www.w3c.org or take a look at the System.XML namespace. You can also use
DataSet.WriteXML and DataSet.ReadXML for basic xml serialization
You don't need to physically create an xml file, you can write to a stream
just as easily.
 
1) Create a xml schema for your xml
2) Use Xsd.exe tool (included in .net framework) to generate corresponding
classes
3) Use XmlSerializer object in System.Xml.Serialization namespace to output
the xml. You can write the output to memory stream instead of file.

Caution: If your schema contains imports element(s), you must explicitely
provide paths to all the schema files on command line when using xsd tool.
The tool will not resolve schema locations in the imports for you.
 
May be SOAP could help you. ;-)
Raghu said:
1) Create a xml schema for your xml
2) Use Xsd.exe tool (included in .net framework) to generate corresponding
classes
3) Use XmlSerializer object in System.Xml.Serialization namespace to output
the xml. You can write the output to memory stream instead of file.

Caution: If your schema contains imports element(s), you must explicitely
provide paths to all the schema files on command line when using xsd tool.
The tool will not resolve schema locations in the imports for you.

on
 
Back
Top