1

We can use any tag of our choice in XML. If we have a DTD and style associate with it, we can parse it in browser. We can transfer data in XML format.

But if XML tags are not fixed like HTML, how two systems come to know each other's meaning of the tags while talking (ex web services)?

How can XML be a general data exchange language on the vast Internet??

kjhughes
  • 106,133
  • 27
  • 181
  • 240
my name is GYAN
  • 1,269
  • 13
  • 27

3 Answers3

2

XML is a general language but pretty much any communication using XML will use a specific XML application such as XHTML, RDF, Atom, RSS, Office Open XML and so on.

XML is a general way to create specific data formats, not to allow completely arbitrary systems to communicate with each others.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
2

The sender and the receiver need to have a shared understanding of the meaning of the element and attribute names. That is why there are many standardized XML vocabularies, e.g. FPML for financial transactions or MusicXML for musical notation; it is in such standards that these meanings are defined.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
2

XML is all about agreement. This agreement can come at different levels:

  • By itself, XML provides a syntactical basis for agreement. By agreeing to adhere to the basic rules provided by the XML Recommendation, parties can be assured of a minimal level of mutual understanding at a syntactical level.
  • Along with a schema, XML provides a grammatical basis for agreement. By agreeing to adhere to the grammar provided by a schema, parties can be assured of a minimal level of mutual understanding at a higher structural level.
  • Along with implied or explicit understanding concerning the meaning of the lower XML levels, XML provides a semantic basis for agreement. The form of this understanding can be conveyed implicitly via naming alone, explicitly via documentation, or operationally via the effects of manual or automated processes that use the XML.

XML's success at each of these levels is evident in the multitude of tools, schemas, and industrial standards that are built on XML.

kjhughes
  • 106,133
  • 27
  • 181
  • 240