Why would XML be a better solution than a typical delimited text file for B2B (business to business applications), or representing data in general? I can take a flatfile, I can parse it and extract data, and then present that data in different ways using java such as HTML or WML. So, why would I want to complicate things with DTDs, parsers, and APIs needed to extract and display data?

Nicola Ken Barozzi

There are many possible answers; XML can be used, as ASCII text files, in many ways. In fact it is also called the ASCII of the future (even if ASCII an XML define two different things).
In B2B the main reason is that it separates the data contained in a document and its structure from the presentation. This means that if you want to change the presentation you can simply change the XSL (stylesheet) and keep the data unchanged. Not to mention how it is easy to change a stylesheet compared to parse it and extract data, and then present that data in different ways using java such as HTML or WML.
But the main advantage is that it is easy to convert XML to XML having a different DTD or schema. For example, firm A has to send a purchase order to firm B. It sends it in XML. Suppose also that firm B keeps track of purchase orders written in XML. Even if the two firms use different XML DTDs or schemas it is easy to use XSL to change from a format to another. Now firm B can insert the order in its database.
Now imagine doing this with a a typical delimited text file ...

On the site W3 Consortium site there is XML in 10 points.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.