Presentation is loading. Please wait.

Presentation is loading. Please wait.

COP 3813 Intro to Internet Computing Prof. Roy Levow XML.

Similar presentations


Presentation on theme: "COP 3813 Intro to Internet Computing Prof. Roy Levow XML."— Presentation transcript:

1 COP 3813 Intro to Internet Computing Prof. Roy Levow XML

2 XML  W3C Standard  Elements describe data –Propertes and Operations –No formatting instructions  But may be provided by XSL  Language used to define other markup languages –XHTML, MathML, VoiceXML, …  Processing requires and XML parser

3 XML Markup  Creates a tree-structure for a document  Example: News article fig. 20.1 fig. 20.1fig. 20.1  Latest generation of browsers display parsed XML using indentation to show tree structure

4 XML DTD  Document type definition (DTD) –Defines allowed content of an XML document  Example: –Business Letter XML fig. 20.3 fig. 20.3fig. 20.3 –Business Letter DTD fig. 20.6 fig. 20.6fig. 20.6

5 XML Validation  XML validation tools are available for download from the web –Microsoft’s tool is available from msdn.microsoft.com, search for XML Validator XML ValidatorXML Validator

6 XML Namespaces  XML components can come from many sources  Need to be able to differentiate among possible duplicate names from different sources  Use namespace –Uniform Resource Identifier (URI) –Like a URL but more general

7 XML Namespaces.2  Namespace uri –similar to a url  includes urls but more general –must be unique  Rather than use a complete uri, define a short dictionary name to use in document –specify xmlns

8 XML Namespaces.3  Example namespaces –fig. 20.4 fig. 20.4fig. 20.4  Example with default –note no name on xmlns for default –fig. 20.5 fig. 20.5fig. 20.5

9 XML DTDs and Schemas  Document Type Definition –Specifies elements for markup of a particular type of document  Example: fig 20.6 fig 20.6fig 20.6  Schemas –More versatile than DTDs  Example: fig. 20.7, fig. 20.8 fig. 20.7fig. 20.8fig. 20.7fig. 20.8

10 Really Simple Syndicaton – RSS  Also known as –Rich Site Summary –RDF (Resource Description Framework) Site Summary  Used to deliver content, a feed, that is manipulated by other programs  Aggregator is an RSS program that combines data from multiple feeds

11 RSS Versions  Multiple versions in use –v0.90 – Netscape (for news headlines) –v0.9x – UserLand –v1.0 – RSS-DEV Working Group –v2.0 –UserLand  UserLand is community effort  RSS-DEV is single vendor

12 Document Object Model - DOM  Parser produces tree of objects –reflecting document structure –JavaScript provides methods to  Traverse tree  Get node information  Modify tree  Create with xmlDoucment.load(“file”);

13 Some DOM Methods  getNodeName – returns #name  getParentNode  getFirstChild, getLastChild  getNextSibling, getPreviousSibling  getNamedItem  getValue, getName  Example: fig 20.19

14 Extensible Stylesheet Language - XLS  XSL-FO, Formatting Objects  XSLT, Transformations  XPath, Locates nodes  SXL Elements (form) – –

15 XSL Elements    Examples: fig 20.29, 20.30


Download ppt "COP 3813 Intro to Internet Computing Prof. Roy Levow XML."

Similar presentations


Ads by Google