XML Information
- Welformed Xml documents must have the following properties.
- All XML elements must have a closing tag (except empty elements).
- All XML elements must be properly nested.
- All XML documents must have a root tag.
- Attribute values must always be quoted.
- Valid Xml document
- A "Valid" XML document is a "Well Formed" XML document which conforms to the rules of a Document Type Definition (DTD).
- Attributes vs Elements
- Attributes can not contain multiple values (elements can).
- Attributes are not expandable (for future changes).
- Attributes can not describe structures (like child elements can).
- Attributes are more difficult to manipulate by program code.
- Attribute values are not easy to test against a DTD.
- Use elements to describe your data.
- Use attributes only to provide information that is not relevant to the reader.
Xml Links