Chapter 3: XML Part I
pages 1 - 26
XML: Extensible Markup Language
- Used to create web pages
- Used to define data
- Used for transferring data between applications
- Based on SGML (Standard Generalized Markup Language) which
emphasizes the content of a document over how it is displayed
World Wide Web Consortium
XML Editors
- Element (starts with a Tag)
- Element Content
- Attribute
- Value
- The ? indicates a processing instruction
- version attribute
- encoding attribute
- standalone attribute
XML Document Parsers
- There are non-validating parsers such as Internet Explorer.
- There are also validating parsers that require a DTD (Document
Type Definition). Validating parsers will
be discussed in the next chapter.
Well Formed Documents
- Must have a root element
- Are case sensitive
- All elements must be closed, even empty ones
- Nesting must be done properly
- Attributes must be quoted
Predefined Characters
Predefined Character | Printed Character |
< | < |
> | > |
& | & |
" | " |
' | ' |
Unicode
- Unicode Home Page
(see the Code Charts)
- To use a unicode symbol in an xml document, type something like
ખ
Comments
Monday Exercise
- Work the 15 review questions at the end of Chapter 3. 3 points.
- Construct an .xml file that contains hypothetical
ordering information for your
e-commerce site. The file should contain information regarding 2
products ordered. It should also include the total due using
the Euro symbol. 2 points.
Wednesday Exercise
Work on your e-commerce site. Jack and John will visit each
team to provide ungraded feedback.