XML & Servlets: Predefined Tags & More

  • Thread starter Robben
  • Start date
  • Tags
    xml
In summary, XML itself has no predefined tags, but in order to make it easier for entities to exchange information, different fields and development environments have their own predefined tags in the form of XML schemas. Eclipse, being a development environment, has its own set of predefined tags, such as <servlet-mapping> and <url-pattern>, to organize the information needed for servlets. These predefined tags are developed by experts and are designed to be both easy to use and effective.
  • #1
Robben
166
2
Before I started self learning servlets I had to learn XML first and I learned that XML has no predefined tags instead they are invented, but while learning servlets I came across tags that are predefined in my eclipse i.e. <servlet-mapping> and <url-pattern>. Am I not understanding this correctly? Can anyone elaborate please?

Thank you.
 
Technology news on Phys.org
  • #2
XML itself has no predefined tags, but XML schema do.

A schema is a predefined set of XML tags designed to carry a certain type of information in a standard format. For example XBEL (http://pyxml.sourceforge.net/topics/xbel/ ) is a schema for exchanging bookmarks.
 
Last edited by a moderator:
  • Like
Likes Robben
  • #3
Robben said:
Before I started self learning servlets I had to learn XML first and I learned that XML has no predefined tags instead they are invented, but while learning servlets I came across tags that are predefined in my eclipse i.e. <servlet-mapping> and <url-pattern>. Am I not understanding this correctly? Can anyone elaborate please?

Thank you.
As you said, XML has no predefined tags, but eclipse is different from XML. From what little I know about eclipse, it appears to be a development environment, and the people behind eclipse have defined some tags to organize the information a servlet needs.
 
  • #4
XML is a meta-language - a language to define other markup languages, so it obviously has no predefined tags. But in the various fields that XML is used, some tags get sort of predefined, in order to make it easy for entities that exchange information, to have a common set of rules - usually expressed as an XML Schema, so the procedure of send - receive - process from both sides, can work in a transparent and smooth way. Among the different conventions that are used in each field - different "dialects" of XML, Eclipse has its own in IDE level - configurations of the IDE, saved profiles and so on and plugins for various aspects of development have their own XML, too. These predefined dialects or document types of XML are developed by experts, so they are both easy - as easy as it can be, and effective.
 
  • Like
Likes Robben

Related to XML & Servlets: Predefined Tags & More

1. What is XML and how is it used in relation to servlets?

XML stands for Extensible Markup Language and it is a popular data format used for storing and transporting data. In relation to servlets, XML is often used to transfer data between a client and a server, making it a useful tool for web development.

2. What are predefined tags in XML?

Predefined tags in XML are elements that have been predefined by a specific document type definition (DTD) or XML schema. These tags provide a standardized structure for organizing and representing data in an XML document.

3. How are servlets used to process XML documents?

Servlets can be used to process XML documents in a variety of ways, such as parsing the document to extract specific data, transforming the document using XSLT, or validating the document against a DTD or schema.

4. Can XML be used to communicate between different programming languages?

Yes, XML can be used as a universal language for communication between different programming languages. This is because XML documents are platform-independent and can be easily parsed and processed by different systems.

5. Are there any advantages to using XML and servlets together?

Yes, there are several advantages to using XML and servlets together. XML provides a flexible and structured way to represent data, while servlets offer a powerful and efficient means of processing and manipulating that data. Together, they can help facilitate communication and data exchange between different systems and platforms.

Similar threads

  • Programming and Computer Science
Replies
1
Views
958
Replies
1
Views
97
Replies
9
Views
2K
  • Programming and Computer Science
Replies
31
Views
3K
  • Science and Math Textbooks
Replies
2
Views
2K
  • Computing and Technology
Replies
1
Views
6K
  • Programming and Computer Science
Replies
1
Views
651
  • Science and Math Textbooks
Replies
6
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Replies
16
Views
1K
Back
Top