Download presentation
Presentation is loading. Please wait.
Published byMelina Harrington Modified over 9 years ago
1
17 Apr 2002 XML Syntax: Documents Andy Clark
2
Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous – Encoding, document type declarations – Entity references – Comments, processing instructions, etc…
3
Example XML Document (1 of 6) XML declaration 01 02 03 04 05 06 Care and Feeding of Wombats 07 42.00 08 09
4
Example XML Document (2 of 6) Document type declaration 01 02 03 04 05 06 Care and Feeding of Wombats 07 42.00 08 09
5
Example XML Document (3 of 6) Processing instructions 01 02 03 04 05 06 Care and Feeding of Wombats 07 42.00 08 09
6
Example XML Document (4 of 6) Element tags 01 02 03 04 05 06 Care and Feeding of Wombats 07 42.00 08 09
7
Example XML Document (5 of 6) Attributes of element tags 01 02 03 04 05 06 Care and Feeding of Wombats 07 42.00 08 09
8
Example XML Document (6 of 6) Text content 01 02 03 04 05 06 Care and Feeding of Wombats 07 42.00 08 09
9
Differences with HTML Elements must be balanced, properly nested e.g. OK e.g. bold and italic text OK e.g. bold and italic text BAD! e.g. list item BAD! Attributes must be specified, quoted e.g. OK e.g. BAD! e.g. list item BAD!
10
Other Important Points Documents must be well-formed – Document contains single root element – Elements are balanced and properly nested – Attributes are specified and quoted – Text content contains legal XML characters Documents may be valid – Document structure and content follows rules specified by grammar (e.g. DTD, XML Schema)
11
Useful Links XML 1.0 Specification – http://www.w3.org/TR/REC-xml Annotated XML 1.0 Specification – http://www.xml.com/axml/testaxml.htm Informational web sites – http://www.xml.com/ – http://www.xmlhack.com/
12
XML Syntax: Documents Andy Clark
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.