Attributes

printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    

Java APIs for XML Kick Start
By Aoyon Chowdhury, Parag Choudhary

Table of Contents
Appendix B.  XML: A Quick Tour


Attributes are name-value pairs that can be associated with an element. The attributes provide additional information about the element, and can be specified only in the start tag of an element. In our example, the id, type, capacity, and price attributes provide additional information about the engine element.

An important point to remember is that if you declare a set of attributes with an element in a DTD and then declare another set of attributes when the element appears again, the attribute set is merged. If the same attribute is defined twice, the second declaration is ignored and only the first one is considered. However, an XML document is considered invalid if it has an element that contains two attributes with the same name.


printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    
Top

[0672324342/app02lev1sec8]

 
 


JavaT APIs for XML Kick Start
JAX: Java APIs for XML Kick Start
ISBN: 0672324342
EAN: 2147483647
Year: 2002
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net