This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Order of tags in XML

 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,all. I got a question. Are tags order sensitive in an XML or TLD file? I know <servlet-name> must appear before <servlet-class> in XML. Is it true for all the tags defined by DTD? I noticed when using some tags in a JSP, for example <%@ taglib uri="aa" prefix="bb">; the order of "uri" and "prefix" is exchangable. Could anyone please help me to understand this issure? Thanks
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether elements have to be in a particular order depends entirely on the DTD that is associated with your XML file.
As for this:

<%@ taglib uri="aa" prefix="bb">; the order of "uri" and "prefix" is exchangable

The "uri" and "prefix" are attributes, not elements. Attributes can always be in any order.
[ July 25, 2003: Message edited by: Ron Newman ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic