• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Order of tags in XML

 
Yuan Ye
Ranch Hand
Posts: 172
  • 0
  • 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
  • 0
  • 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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic