intro to xml
DESCRIPTION
TRANSCRIPT
ObjectivesObjectives
History andMarkup languagesComparison between XML and
HTMLXML SyntaxXML Design rationaleXML Elements and AttributeXML DTDXML Validation
HistoryHistory
SGMLHTML
XML1985 1990
199598
Standardized General Markup Language
HyperText Markup Language
eXtensible Markup Language
Introduction of XML
XML stands for EXTENSIBLE MARKUP LANGUAGE
XML represent the text information in a standard format
XML was designed to transport and store information
It is used for documents containing structure information in a reliable way
What do mark up languagesdo
1048708 Markup languages consist of a set of markupconventions used for encoding texts1048708 A markup language specifies ndash1048708 What markup is allowed1048708 What markup is required1048708 How the mark up is distinguished from text1048708 What the markup means
Features of XML
XML files are text files which can be managed by any text editor
XML is very simple because it has less than 10 syntax rules
XML tags are not predefined You must define your own tags
XML is designed to be self-descriptive
ADVANTAGES OF XML
It can represent common computer science data structures records lists and trees
Its self-documenting format describes structure and field names as well as specific values
The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple efficient and consistent
XML is heavily used as a format for document storage and processing both online and offline
How is XML different fromHTML
HTML and XML have different sets of goals
HTML was designed to display data and hence
focused on the lsquolookrsquo of the data
XML was designed to describe and carry data and hence focuses on lsquowhat data isrsquo
XML Does Not DO Anything HTML and XML are complementary to each
other
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
HistoryHistory
SGMLHTML
XML1985 1990
199598
Standardized General Markup Language
HyperText Markup Language
eXtensible Markup Language
Introduction of XML
XML stands for EXTENSIBLE MARKUP LANGUAGE
XML represent the text information in a standard format
XML was designed to transport and store information
It is used for documents containing structure information in a reliable way
What do mark up languagesdo
1048708 Markup languages consist of a set of markupconventions used for encoding texts1048708 A markup language specifies ndash1048708 What markup is allowed1048708 What markup is required1048708 How the mark up is distinguished from text1048708 What the markup means
Features of XML
XML files are text files which can be managed by any text editor
XML is very simple because it has less than 10 syntax rules
XML tags are not predefined You must define your own tags
XML is designed to be self-descriptive
ADVANTAGES OF XML
It can represent common computer science data structures records lists and trees
Its self-documenting format describes structure and field names as well as specific values
The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple efficient and consistent
XML is heavily used as a format for document storage and processing both online and offline
How is XML different fromHTML
HTML and XML have different sets of goals
HTML was designed to display data and hence
focused on the lsquolookrsquo of the data
XML was designed to describe and carry data and hence focuses on lsquowhat data isrsquo
XML Does Not DO Anything HTML and XML are complementary to each
other
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
Introduction of XML
XML stands for EXTENSIBLE MARKUP LANGUAGE
XML represent the text information in a standard format
XML was designed to transport and store information
It is used for documents containing structure information in a reliable way
What do mark up languagesdo
1048708 Markup languages consist of a set of markupconventions used for encoding texts1048708 A markup language specifies ndash1048708 What markup is allowed1048708 What markup is required1048708 How the mark up is distinguished from text1048708 What the markup means
Features of XML
XML files are text files which can be managed by any text editor
XML is very simple because it has less than 10 syntax rules
XML tags are not predefined You must define your own tags
XML is designed to be self-descriptive
ADVANTAGES OF XML
It can represent common computer science data structures records lists and trees
Its self-documenting format describes structure and field names as well as specific values
The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple efficient and consistent
XML is heavily used as a format for document storage and processing both online and offline
How is XML different fromHTML
HTML and XML have different sets of goals
HTML was designed to display data and hence
focused on the lsquolookrsquo of the data
XML was designed to describe and carry data and hence focuses on lsquowhat data isrsquo
XML Does Not DO Anything HTML and XML are complementary to each
other
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
What do mark up languagesdo
1048708 Markup languages consist of a set of markupconventions used for encoding texts1048708 A markup language specifies ndash1048708 What markup is allowed1048708 What markup is required1048708 How the mark up is distinguished from text1048708 What the markup means
Features of XML
XML files are text files which can be managed by any text editor
XML is very simple because it has less than 10 syntax rules
XML tags are not predefined You must define your own tags
XML is designed to be self-descriptive
ADVANTAGES OF XML
It can represent common computer science data structures records lists and trees
Its self-documenting format describes structure and field names as well as specific values
The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple efficient and consistent
XML is heavily used as a format for document storage and processing both online and offline
How is XML different fromHTML
HTML and XML have different sets of goals
HTML was designed to display data and hence
focused on the lsquolookrsquo of the data
XML was designed to describe and carry data and hence focuses on lsquowhat data isrsquo
XML Does Not DO Anything HTML and XML are complementary to each
other
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
Features of XML
XML files are text files which can be managed by any text editor
XML is very simple because it has less than 10 syntax rules
XML tags are not predefined You must define your own tags
XML is designed to be self-descriptive
ADVANTAGES OF XML
It can represent common computer science data structures records lists and trees
Its self-documenting format describes structure and field names as well as specific values
The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple efficient and consistent
XML is heavily used as a format for document storage and processing both online and offline
How is XML different fromHTML
HTML and XML have different sets of goals
HTML was designed to display data and hence
focused on the lsquolookrsquo of the data
XML was designed to describe and carry data and hence focuses on lsquowhat data isrsquo
XML Does Not DO Anything HTML and XML are complementary to each
other
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
ADVANTAGES OF XML
It can represent common computer science data structures records lists and trees
Its self-documenting format describes structure and field names as well as specific values
The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple efficient and consistent
XML is heavily used as a format for document storage and processing both online and offline
How is XML different fromHTML
HTML and XML have different sets of goals
HTML was designed to display data and hence
focused on the lsquolookrsquo of the data
XML was designed to describe and carry data and hence focuses on lsquowhat data isrsquo
XML Does Not DO Anything HTML and XML are complementary to each
other
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
How is XML different fromHTML
HTML and XML have different sets of goals
HTML was designed to display data and hence
focused on the lsquolookrsquo of the data
XML was designed to describe and carry data and hence focuses on lsquowhat data isrsquo
XML Does Not DO Anything HTML and XML are complementary to each
other
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML Syntax Rules
Now lets take a look at some of the important rules of XML syntax
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
ltpgtThis is a paragraphltpgt
ltbr gt
The tag ltLettergt is different from the tag ltlettergt
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
ltbgtltigtThis text is bold
and italicltigtltbgt
ltrootgt ltchildgt
ltsubchildgtltsubchildgt ltchildgtltrootgt
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML Elements
An Element is a technical term for a
textual unit viewed as a structural
component Different types of elements are given
different names The names do not express meaning and
meanings are application dependent XML elements are extensible
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
Authoring XML Elements
An XML element is made up of a start tag an end tag and data in between
Example
ltdirectorgt Matthew Dunn ltdirectorgt
Example of another element with the same value
ltactorgt Matthew Dunn ltactorgt
XML tags are case-sensitive
ltCITYgt ltCitygt ltcitygt
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
Authoring XML Attribute (contrsquod)
An attribute is a name-value pair separated by an equal sign (=)
Example
ltCity ZIP=ldquo94608rdquogt Emeryville ltCitygt
Attributes are used to attach additional secondary information to an element
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML Attributes
1048708 XML elements can have attributes in
namevalue pairs as in HTML
1048708 Attributes must always be in quotes
Either single or double quotes are valid
though double quotes are most common
1048708 Attributes are always contained within
the start tag of an element
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
What is an XML DTD
1048708 DTD stands for Document Type Definition
1048708 DTD is a formal model for defining the role
of each element
1048708 It formally defines the relationship between
the various elements that form the documents
1048708 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTDDTD does not constrain data types All values represented as strings in XMLDTD definition syntaxltELEMENT element (subelements-specification) gtltATTLIST element (attributes) gthellip more details laterValid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test PUBLIC -WebsterDTD test V10ENlttestgt test is a document element lttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
ltDOCTYPE test [
ltELEMENT test EMPTYgt ]gtlttestgt
External Public DTD Declaration
Internal DTD Declaration
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
ltxml version=10 encoding=ISO-8859-1gt ltDOCTYPE test SYSTEM testdtdgtlttestgt test is a document element lttestgt
External DTD Declaration referring to a file or a URL
test = name of the root element
DTD is defined in file testdtd
DTD is defined
inside XML
Application should
know DTD
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML Validation
There are two types of XML documents ldquoWell formedrdquo XML An XML document that conforms to the
syntax of XML is called lsquowell formedrsquo ldquoValidrdquo XML An XML document that conforms to a
DTD Is called a lsquoValidrsquo DTD
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
What is a well-formed XML document What is a well-formed XML document
Well-formed documents follow basic syntax rules eg there is an XML declaration in the first line there is a single document rootall tags use proper delimitersall elements have start and end tags
But can be minimized if empty ltbrgt instead of ltbrgtltbrgt
all elements are properly nested
ltauthorgt ltfirstnamegtMarkltfirstnamegt
ltlastnamegtTwainltlastnamegt ltauthorgtappropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML Validator
Use our XML validator to syntax-check your XML
XML Errors Will Stop YouSyntax-Check Your XMLSyntax-Check an XML FileValidate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
Viewing XML Files
Raw XML files can be viewed in all major browsers
Dont expect XML files to be displayed as HTML pages
Viewing XML Files
Viewing an Invalid XML File
Look at this XML file notexml
Look at this XML file
note_errorxml
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML applications
1048708 B2B1048708 EDI1048708 Journal publishing1048708 Database development
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
XML future
Given the direction in which it is growing and the level of
support thatXML has received the XML appears
to be thefuture of Web publishing
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-
SummarSummarYY
XML has a wide range of applicationsXML is just a formalism (meta-language) unlike HTMLThe W3C framework includes
General purpose (accessory transducing ) languages such as XML Schema XSLT XPath XQuery Xlink RDF hellip
Useful languages for contents (vector graphics multimedia animation formulas
Other organizationsDefine domain-specific vocabulariesDefine alternative XML-based general purpose languages
XML is mostly used ldquobehind the scenerdquo but increasingly directly for web contents (via XSLT mostly)
- PowerPoint Presentation
- Slide 2
- Slide 3
- Introduction of XML
- What do mark up languages do
- Features of XML
- ADVANTAGES OF XML
- How is XML different from HTML
- XML Syntax Rules
- Slide 10
- XML Elements
- Authoring XML Elements
- Authoring XML Attribute (contrsquod)
- XML Attributes
- What is an XML DTD
- Slide 16
- Slide 17
- XML Validation
- Slide 19
- XML Validator
- Viewing XML Files
- XML applications
- XML future
- Slide 24
-