Extensible Markup Language (XML)
standard for data representation and exchange
document format similar to HTML
– tags describe content instead of formatting
also streaming format
Basic constructs
tagged elements (nested)
attributes
text
“Well-formed” XML
adheres to basic structural requirements
– single root element
– matching tags, proper nesting
– unique attributes with elements
test XML structure with XML parser
parsed XML: DOM, SAX
Displaying XML
as XML document
use XSL (extensible stylesheet language) or CSS
Relational Model vs. XML
relational | xml | |
---|---|---|
structure | tables | hierarchical tree |
schema | fixed in advance | flexible, “self-describing” |
queries | simple langs | less so |
ordering | unordered | implied ordering |
implementation | native | add-on |