unit 8 xml documents. key concepts xml fundamentals xml document format document declaration xml...

Download Unit 8 XML Documents. Key Concepts XML fundamentals XML document format Document declaration XML elements and attributes Parsing Characters and white

If you can't read please download the document

Upload: godfrey-dean

Post on 08-Jan-2018

242 views

Category:

Documents


0 download

DESCRIPTION

XML Fundamentals Stored as text files. Can be created with any text editor. Hierarchical data storage format. Must contain at least one (root) element. File names end in.xml extension by default, but vary with use.

TRANSCRIPT

Unit 8 XML Documents Key Concepts XML fundamentals XML document format Document declaration XML elements and attributes Parsing Characters and white space Reserved characters CDATA XML namespaces XML Fundamentals Stored as text files. Can be created with any text editor. Hierarchical data storage format. Must contain at least one (root) element. File names end in.xml extension by default, but vary with use. Sample XML Document Welcome to XML! 8 Key Points Elements are enclosed in angle brackets . The root element is the first element opened and last element closed. Inner elements in the hierarchy are called child elements. Common Programming Errors Attempting to create more than one root element. Not adhering to case on element tags. Improper nesting. Improper Nesting Hello World XML Parsing Parsing Failure Characters Supports ASCII and Unicode characters Markup text is enclosed in angle brackets Character data is inserted between tags White space characters include spaces, line feeds, and carriage returns. Reserved Characters Reserved for use by XML Ampersand (&) Left angle bracket () Apostrophe (') Double quote (") Built-in entities Ampersand (&) Built-in entities Ampersand (&) Left angle bracket () Apostrophe (') Double quote (") Book Sample = Deitel&s XML Primer Paul 13 Deitel Welcome 18 Easy XML 19 XML Elements? 20 Entities Book Sample (cont'd) CDATA Example // C++ comment 10 if ( this->getX() < 5 && value[ 0 ] != 3 ) 11 cerr displayError(); getX() < 5 && value[ 0 ] != 3 ) 19 cerr displayError(); 20 ]]> C++ How to Program by Deitel & Deitel 24 CDATA Example (cont'd) Namespaces A book list A funny picture Default Namespaces A book list A funny picture