Intro To XML
Intro To XML
to
< XML />
What is XML?
• Extensible Markup Language (XML) - allows you to
describe and organize information in ways that are easily
understandable by both humans and computers.
• XML derived from the older standard called Standard
Generalized Markup Language (SGML), is a metalanguage.
XM
L
• You can use XML to create your own markup language that
includes a set of rules and tags that describe information
suited to your needs.
• XML
- Information is transferred Language used for data
description and used to store data
Extensible Markup Language
1 2 3
Uses <> tags or marks Simplifies Things Data Exchange
In XML it uses own tags and it • XML simplifies data It is used for Data
is not limited and not sharing Exchange and
predefined • XML simplifies data communication
transport between two
• XML simplifies applications
platform changes
• XML simplifies data
availability
Advantages of XML Common Uses of XML
These are set of modules that provides XML users with useful
services.
• XSL
• XPath
• XLink
• XQuery
XSL - Extensible Stylesheet Language
- developed by the World Wide Web Consortium
- described how XML should be displayed
3 parts of XSL:
• XSLT
• XPath
• XSL-FO
I have several friends.
Jose, Maria, and Juan are my
friends.
• Structured
• Formatted
• Common rule & syntax
I have several friends.
Jose, Maria, and Juan are my
friends.
• Structured
• Formatted
• Common rule & syntax
XML
Syntax
XML
Optional and is the first line
PROLOG
XML
Optional and is the first line
PROLOG
ROOT
Must contain a root element that is parent of all elements
XML
Optional and is the first line
PROLOG
ROOT
Must contain a root element that is parent of all elements
TAGS
All elements must have a closing tag, XML Tags are Case Sensitive
XML
Optional and is the first line
PROLOG
ROOT
Must contain a root element that is parent of all elements
TAGS
All elements must have a closing tag, XML Tags are Case Sensitive
ATTRIBUTES
Must always be quoted
XML
Optional and is the first line
PROLOG
ROOT
Must contain a root element that is parent of all elements
TAGS
All elements must have a closing tag, XML Tags are Case Sensitive
ATTRIBUTES
Must always be quoted
NESTING
XML Elements must be nested properly
XML
Optional and is the first line
PROLOG
ROOT
Must contain a root element that is parent of all elements
TAGS
All elements must have a closing tag, XML Tags are Case Sensitive
ATTRIBUTES
Must always be quoted
NESTING
XML Elements must be nested properly
COMMENTS
XML
Optional and is the first line
PROLOG
ROOT
Must contain a root element that is parent of all elements
TAGS
All elements must have a closing tag, XML Tags are Case Sensitive
ATTRIBUTES
Must always be quoted
NESTING
XML Elements must be nested properly
COMMENTS
WHITE SPACES
XML Namespace
Name conflicts in XML and can be resolved by using PREFIX
Name conflicts in XML and can be resolved by using PREFIX
Name conflicts in XML and can be resolved by using PREFIX
When using Prefixes in XML, a Namespace for prefix must be defined
xmlns:prefix="URI"
XMLNS Attribute
When using Prefixes in XML, a Namespace for prefix must be defined
xmlns:prefix="URI"
The namespace can be declared and defined
in the starting of the element or the starting of
the XML in the root element itself
xmlns:prefix="URI"
The namespace can be declared and defined
in the starting of the element or the starting of
the XML in the root element itself