Click here to Skip to main content
14,265,899 members
Rate this:
Please Sign up or sign in to vote.
See more:
i am very confuse with the xml. i dont know how it works. does it store data in Xml format or store in database. or it is used of transfer data between machine? does client have to tranfer xml file and server read that file or client passes data and server store in xml format.
Posted
Updated 23-Nov-11 22:20pm
v2
Comments
Member 7901336 24-Nov-11 5:11am
   
see what i understood (if one application is in java (platform=linux, database=Oracle) and other is in C #(platform= windows, database=SqlServer) so this application are going to transfer data in xml format so there is no issue. could you please tell me how practically xml works (no need for code) i need just explanation so that i get have some idea
Rate this:
Please Sign up or sign in to vote.

Solution 2

You can use XML is for both, storing and transferring data.
For transferring, you usually don't create a file and transfer it but send the content directly.

XML is human readable text. Some of the characters ('<' and '>') are interpreted as keyword markers. That way it is very flexible in what you can use it for.

[EDIT]
For transferring data from a sender machine to a receiver machine, you would most likely have the data you want to transfer in an object.

The sender serializes the object. That means it converts the object to a byte stream. This stream can be formatted in XML, SOAP (which is built on top of XML), JSON, whatever.

The receiver receives the byte stream and deserializes it to an object. This object should be equivalent to the one the sender has sent before in that it holds the same data.

The (de)serialization part can get fiddly. Therefore try to use something that already works. In C#, I have used the SOAP formatter class[^] and it works well. You should look for something that exists for both your endpoints.
[/EDIT]
   
v2
Comments
Member 7901336 24-Nov-11 5:05am
   
see what i understood (if one application is in java (platform=linux, database=Oracle) and other is in C #(platform= windows, database=SqlServer) so this application are going to transfer data in xml format so there is no issue.

could you please tell me how practically xml works (no need for code) i need just explanation so that i get have some idea
Rate this:
Please Sign up or sign in to vote.

Solution 3

XML[^] (Extensible Markup Language) is a protocol (a set of rules agreed upon by international regulatory bodies) for storing information in textual format (i.e., somewhat human readable form).

It supports, via Unicode, all the world's character sets from alphabetic-phonetic through idiogramatic.

XML, by design, can represent hierarchy (things inside things), Attributes of Objects, etc.

When, where, and how, a client-server scenario uses XML can vary widely; similarly, when-where-how any application uses XML can vary widely.

For every usage scenario you mentioned, the answer is "yes, maybe, and 'even more'." You could have, for example, a scenario in which one machine sends out XML (and contains only an internal encoder from its own format to XML), and a receiving machine can only read XML (contains only a translator from XML to its own format) ... but that is very unlikely.

In .NET C#[^] you have XML read and write functionality built-in that you can adapt for almost any purpose you can imagine.

There are great resources here on CodeProject to help you with XML[^]
   
Rate this:
Please Sign up or sign in to vote.

Solution 1

Xml is just a text file that is designed only to store data. It does this by storing information as text in between tags. For an excellent tutorial, take a look at this web site XML Introduction - W3 Schools[^].
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100