XML & Servlets: Predefined Tags & More

  • Thread starter Thread starter Robben
  • Start date Start date
  • Tags Tags
    xml
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
Robben
Messages
166
Reaction score
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.
 
Physics news on Phys.org
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   Reactions: Robben
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.
 
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   Reactions: Robben