XML from Beginner to Expert

You will discover how to create and read XML files starting from simple and ending with complex structure file
3.8 (6 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
168 students enrolled
Instructed by Daniele Protti IT & Software / Other
$19
$60
68% off
Take This Course
  • Lectures 94
  • Length 4 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 1/2016 English

Course Description

A complete video tutorial to understand and write your own XML files, create amazing web services and manage your information within your organization and also in connection with other external entities and partners.

Basically the course contains:


Introduction

Why XML

Organization of the course


The Overview of XML

Why XML

Example of An XML document

Basic Rules

Nesting

Attributes

Definitions

The XML Syntax


Structure of an XML document

Components of an XML document

Elements of an XML document

Nesting of elements

Tag naming

Tag attributes

Predefined entities


The DTD Grammars

The DTD Grammars

Validation Tools

Define Your First Grammar

Internal and External Grammars

More documents for the same Grammar

The Basis of XML Grammars


DTD and Entities

DTD and Entities

Syntax of the internal Entities

Syntax of the external Entities

Syntax of the parametrical Entities


DTD and Attributes

Syntax of attributes

Attributes in the DTD grammars

Type of Attributes and Modifiers

Enumerations

NMTOKEN and NMTOKENS


The namespaces

The namespaces

Why the XML namespaces

Use the XML namespaces

Syntax of the namespaces

Attributes and namespaces

Use the XML namespaces

Namespaces and DTD grammars

An application of namespaces


Transform with XSLT

Transform with XSLT

Example of XSLT Transformation

2nd Example of XSLT Transformation

Templates


Formatting with XSL:FO

The formatting process

Example

2nd Example - more complex


XPath

How to use XPath

Patterns for the match attribute

Patterns for the select attribute


XLink and XPointer

XLink and XPointer

XLink

Simple use of XLink

Complex links

XPointer

Example of use of XPointer


XML and the Web: XHTML

What’s XHTML

The basic XHTML syntax

The validation process

TEI - XML and text encoding

TEI

Structure of a TEI-Lite document

Transform a TEI-Lite document


MathML

RSS

Webservices


What are the requirements?

  • an advantage is to know some basic HTML
  • be familiar with computers and the Internet

What am I going to get from this course?

  • create XML documents
  • validate XML documents
  • create or interface with XML web services
  • use XML files to store and read data
  • create DTD grammars for XML documents
  • Access XML data with XPath
  • Generate RSS feeds
  • Use MathML for online academic presentations
  • recognize the structure of an XML document
  • understand and create XHTML files

What is the target audience?

  • Basic knowledge of HTML and Javascript is recommended
  • familiarity with Windows or Mac computers
  • Who is familiar with computers and the Internet
  • Basic knowledge of programmin languages is an advantage in case you want to read or write data to/from an XML file using a program written in Java, C, C++, VB, PHP, etc.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
About the author
01:44
Welcome to the Course - Introduction
02:36
04:46

Although it is defined as a language, in reality it is NOT. It is a set of rules and conventions to define any markup language (based on markups).

With XML you can define your own language and the hierarchical relationships between the components.

With XML you can extend your language.

Section 2: The Overview of XML
01:47

XML has become one of the fundamental elements for the implementation of information systems, independently from the technology and the used architecture

In this lesson we will see why XML is important and when it is to be used.

  • The markup languages allow to describe with precision any kind of information (hierachical, relational or binary
  • In XML the information is organized according to a hierarchical structure which you can easily scroll down and browse where the needed information can be retrieved
  • HTML is one of the most known markup language (to create web pages)
03:03

In this example we will understand what tags are in XML and how to use them.

We will understand the hierarchical structure of an XML document and how it is displayed in an Internet browser

04:30

In order to understand the basic rules of an XML document,despite its content, we will first analyze an example.

We will give an informative structure assigning meaningful names to the tag.

The example contains information to describe a organizational structure in a generic business company.

01:42

Nesting is one of the most important concept when structuring an XML document.

The objects representing the information are inserted one within the other, when this is meaningful from the logical point of view, through the nesting process.

01:16

XML tags, as in any markup language, are associated to attributes which explain better some characteristic.

Attributes are couples name=“value” which must be inserted within the tag.

00:49

We will see the most important definitions to be used when structuring an XML document.

We will concept e.g.:

  • Compliance
  • Validation
  • Grammar

and we will see when an XML is valid and what valid means

Section 3: The XML Syntax
02:11

XML Syntax is the set of sintatic rules to respect to have a well formed XML document.

In this lesson we will talk about the XML Syntax starting from the structure of an XML document.

An XML document is a container of information characterized by a hierarchical logical structure which can contain any type of object (flat, relational, binary or as object).

00:45

In this lesson we will see what a prologue is in an XML file and when it has to be included.

01:17
In this lesson we will see what the XML declaration is and how it is done in an XML file.
00:49

The Elaboration instructions are directives to give guidelines to the applcation using the XML document.

00:53

An XML document can be associated to grammar rules.
The grammar rules describe the semantic aspects of an XML document.

We will see how to set the information about the Grammar into an XML document.

01:58

We will see how to specify comments into an XML document.

Comments are additional information which can provide explanation about what is in an XML document.

02:27

We will see the defintion of the elements in an XML document and also some examples where elements are used.

An XML document is composed of a hierarchy of elements which can be nested at wish according to precise sintactic rules.

01:14

We will see how to define the most important and external element in an XML document: the root element

01:23

After the overview of the elements in an XML document we will see how to generate nesting of elements

02:24

We will see how we can name elements in XML and which naming convention is available for XML.

We will see which names are allowed and which not.

03:31

Sometimes some information of an element instead of being specified in a child element can be expressed as its specification. attributes to be associated to the markup of the elements.

Using attributes it is possible to better specify some characteristics or behaviours of the element.

We will see how to do this in this lesson.

01:55

As for the elements there are specific naming conventions also for the attributes.

This is explained in this lesson.

03:56

In this lesson we will see how to set the values of the attributes of elements in an XML document

01:25

In XML there are special markups which are called entities.

An entity, in general, is a way to insert into an XML document a piece of text to be analyzed only during the elaboration phase of the XML document.

It is therefore not considered during the analisys of the form of the document.

We will see the main predefined entities in XML.

Section 4: The DTD Grammars
01:21

Well formed XML documents are those compliant to the XML syntax as described in the specifications

XML documents must contain the information in such a way to be elaborated in automatic way.

At this aim syntactic rules alone are not enough.

We need also to define a grammar to identify the allowed elements, their number, their attributes, what is optional and what is mandatory, etc.

02:12

Validation can be performed through several tools available on the market.

Some of them are very complex tools including many functions to study and generate grammars, and to validate and transform XML documents.

A list of some of popular validation tools will be shown in this lesson.

09:09

To define a Grammar it is necessary to know and understand what we need to represent with our XML document.compliant to in order to produce what we are aiming.

We will start with the organization of the information and define our first Grammar.

02:46

We saw that we can insert a grammar in an XML document.

We already said that we can specify a grammar within an external file (extension “.dtd”).

This is a flexible way as you can refer more than one XML document to this file if you are using the same grammar.

In this lesson we will see what happens to our example when we move the grammar to an external document.

01:11

We just understood the principles of XML grammars and their relationships with the XML documents.

We will see in details some sintactic elements to produce XML grammars.

01:32

The grammar structure of a document is a portion of code which must satisfy some important sintactic rules.

Everything is linked to the concept of document type, which the grammar represents the definition.

A grammar describes a document type as all the XML documents which respect that grammar have structural characteristics in common.

Thus these documents are of the same type.

01:58
As we already saw an XML element can contain:
  • Textual information
  • Other elements
  • Textual information and other elements
  • Nothing (the empty element)

Each of these situations can be described with the grammar rules of the DTD grammars.

We will see this in this lesson.

01:24

We already said that the root element and the document type must have the same name.

We will see how to define the Grammar for the root element.

03:06

An XML document is a container of information organized hierarchically.

The hierarchy is described by the DTD grammars.

In this way the XML document is validated for its structure.

We will see how to do this with the hlep of the Nesting concept.

03:09

The rules describing the sorting order are very rigid.

It can be useful to have elements with a non pre-defined number of child elements.

It can be useful to have more than one instance for child element.

This is done defining the allowed number of elements in the Grammar.

02:07

You may need to choose only one element in a pre-defined list.

In this case the sintactic elements are no more enough.

In this lesson we will see how to do this.

01:24

In this lesson we will see how to define elements of mixed content in an XML document

01:02

Sometimes you might need to define elements which you do not decide the content type yet.

This is useful to have less constraints during the analysis.

This means to define a rule which specify for an element to contain any information (text or list of sub-elements).

We will see how to do this in this lesson.

00:40

We already know that in XML we can have elements without content.
The information of these is represented by the presence of the element itself.
No further information is needed.
We will see how to do this in this lesson.

02:55

A sequence allows to decide everything about the content of an element:

  • Which elements can be present
  • If textual data can be present
  • In which order the elements must be inserted
  • In which number
  • If they are mandatory or optional

We will see how to define a sequence in XML in this lesson.

Section 5: DTD and Entities
01:29

In this lesson we will see:

  • What an entity is
  • How to create grammar using entities to represent in modular way the information within the XML document
02:33

The entities are declared in the grammar and are then used in the XML document.

We will see in this lesson how to declare an entity (the syntax).

05:52

Also external entities can be defined.
External entities are contained in XML documents or grammars but in separated documents.
We will see in this lesson how to define an external entity.

03:54

We just saw entities which are defined in DTD grammars and then are inserted in the XML code to be substituted with the value associated to the entity.
In case you may need to have the same result within the DTD grammar.
It is possible to use the parametric entities defined and used directly in the DTD grammar.
We will understand the concept of parametric DTD analyzing one example of an XML document referring to an internal DTD grammar.

Conclusions
00:32
Section 6: DTD and Attributes
04:29

Generating a grammar we need to consider the attributes that are present in the XML document.
If we do not do this and try to validate the XML document the result will be negative.
In fact, in the grammar we missed out the definition of the attributes of the elements.
We need to describe any attribute in any element of a XML document in the associated grammar.
We will see how to do this in this lesson.

05:19

The attributes are associated to a type to explain to the XML parser which information they can memorize.
In this lesson we will see a list of possibile types to be associated to attributes.

01:50

Enumerations are attributes for which a real type is not defined in the grammar, but a list of possible values.
If the attribute present in the XML document is associated to one of the values provided by the grammar.
Then the document can be valid.
In case we use an attribute not included in the list, the document could not be validated.

03:24

The type of data NMTOKEN identifies a typical XML name.
We will see the rules indicated by the NMTOKEN attribute.
Another type of values associable to the XML attributes is NMTOKENS.
With NMTOKENS you define a list of values of the NMTOKEN type.
When using NMTOKENS it is natural to think that the value of the attribute is a list of names where every single element follows the naming rules defined before.




Conclusions
01:19
Section 7: The Namespaces
01:37

Using complex and sofisticated structures can introduce problems, especially if we are going to use more grammars, also produced by third parties.
We can solve this issue using the namespace.
We will see how to do this in this lesson.

02:44

Starting from an example of XML document created with the contribution of 2 different teams we will understand the importance of namespaces for XML.

02:11

We will see how to use the namespaces starting from the previous examples of XML documents.

03:52

In this lesson we will see the syntax of the namespaces in XML.

00:59

Attributes are also defined for the XML namespaces.

We will see how to define attributes for a namespace.

01:52

The presence of DTD grammars and the the requisite to validate the XML documentnis delicate when using the namespaces.
We will see how to validate an XML document using a grammar which makes reference to namespaces.

03:12

The best example to show the importance of namespaces in the XML language is the integration of a portion of MathML code within an XHTML document.

Conclusions
00:55
Section 8: Transform with XSLT
01:37

XSL stands for eXtensible Style Language.
It is the component of a language for the definition of style sheets.
These style sheets handle the presentation of data contained in XML documents.
In this way they can be shown correctly, e.g. In a web browser.

08:44

In this lesson we will see an example of how to use XSLT to transform an XML document in something different.

00:42

In this lesson we will complicate the structure of the previous example.
Having an XML document it is possible to apply different XSLT documents in order to obtain different results with the aim to always produce a HTML file as an output....
We will see the result of producing the transformation of the XML document.

03:45

Templates are rules that can be applied to any XML element of the source document.
They are replicated automatically for all the istances of that element.

Conclusions
00:36
Section 9: Formatting with XSL:FO
01:42
In this lesson we will see how to convert an XML document into one of the several formats: pdf, awt, mif, pcl, ps, txt, svg and at
06:41

In this lesson our scope is to transform an XML document into a PDF file going through the generation of the XSL:FO document using an XSL style sheet.

02:22

In this lesson starting from an XML document dealing with personal data of customers we will generate a PDF report containing all the data.

Conclusions
00:39
Section 10: XPath
00:44

In the 2 components of the XSL language, XSLT and XSL:FO, we need to retrieve key elements in XML documents to use to extract information useful in other environments: this is done by the special expressions of the XPath language.
XPath is a powerful and flexible language used to create expressions even complex: patterns.
Through patterns the nodes of the XML document tree can be retrieved.
XPath is a key element to retrieve information within an XML document.

02:18

To better understand XPath we will go back to the previous example.

03:46

The match attribute is typical of the <xsl:template> element used in XSL.
The scope of match is to position the XSL elaboration in a specific point of the XML document in order to be run a recurring process through all the elements.
The pattern to use has to retrieve exactly an element, or a collection of elements, within the XML document.

02:37

The select attribute is typical of all the XSL elements which have to accomplish actions of data extraction from specific elements within the XML document.

Conclusions
00:27
Section 11: XLink and XPointer
01:45

We always referred to one XML document, sometimes associated to a DTD grammar or transformed with a XSL stylesheet or formatted with XSL:FO, we need to talk now about the possibility to link different documents using dedicated sintactic structures.

It is the possibility to link different documents using dedicated sintactic structures.

In this way we can easily move between documents according to specific conditions.

01:37

One of the essential characteristics of the World Wide Web and of the markup language which all the services are produced with is the opportunity to create separate and autonomous documents but that can be linked together when needed.

The link, in this specific case, is the possibility to point your own navigation software towards a web page, presenting and offering to the user the opportunity to move on another page through a simple click of the mouse.

05:27

In the HTML language, when we need to insert a link to another HTML page, or in general to a resource external to the document, we use the <a> markup.
In XML, on the other hand, we cannot use predefined tags.
In fact, we know, XML does not have a dictionary of tags to use.

01:15

The syntax of the “simple” links allows good functional characteristics.
XLink allows the creation of very complex links, even with very important characteristics and functionalities.
This aspect of XLink is based on another value of the xlink:form attribute: extended.
We will see an example in this lesson.

01:14

One of the goals achieved with XPointer is the possibility to refer directly some precise areas of the XML document.
In particular it is possible to identify very precisely a certain sequence in a specific paragraph within the document and indicate it as precise destination of a link based on XLink.

01:21

In this lesson we will see an example of XPointer.

Conclusions
00:37
Section 12: XML and the Web: XHTML
04:14

We saw all the semantic and sintactic aspects of the XML language, it is now time to see this language operating in one of its most used expressions, the XHTML language for the Web.

The XHTML language is an application of XML which contains the re-mapping, one by one, of all the markups of the HTML language.
With XHTML it is possible to create XML documents to be viewed by the web browsers as well as for the HTML documents.

07:35

XHTML is an XML application.
As a consequence it is first of all an XML document.
So we will see in this lesson the syntax of XHTML.

04:06

We already know about the importance of the validation of an XML document when associated to a DTD grammar
This need relies on the fact that an XML document not associated to a grammar can potentially contain any element and within each element an arbitrary number of attributes can be present every attribute with a non determinable value
As the generic XML document must be used by a software, which must extract its content, it is recommended to associate that XML document to a specific grammar and has to respect it too, so that the software can verify the validity before the elaboration and eventually can interrupt it
In the case of XHTML document this factor is fundamental.
In fact the browser (the tool to view the document) might be not able to view the document correctly if this is not compliant to one of the grammars which the browser can interpret.
In this lesson we will see an example of document which should be XHTML but that is not well formed.

Conclusions
00:43
Section 13: TEI: XML and text encoding
01:17

There are many encoding schemes to represent the semantic structure of a certain type of documents, both in the form and in its relevant characteristics. One of these is provided by the TEI (Text Encoding and Interchange) specification

We will talk about text encoding through the use of the TEI-Lite specification

There are several schemes for text encoding Standard Generalized Markup Language) power and simplicity

One of these, good for the quality and simplicity, is provided by the TEI (Text Encoding and Interchange) specification

03:22

The goal of TEI-Lite is to provide a grammar and a set of tools to express in XML the semantic and structural organization of a tex.

We will see examples of TEI-Lite document containg text composed of a single or of a collection of works

03:05

TEI-Lite is an XML application

As a consequence a TEI-Lite document can be treated:

  • with the XSLT stylesheet
  • and with the XSL:FO transformation tools to obtain documents in other formats

We will see an example of TEI-Lite document

Conclusions
00:55
Section 14: XML Applications
04:07

MathML is one of the few applications made public as standards by the international organizations, many proprietary formats have been designed and written to contain information of dedicated software tools.

MathML allows to describe any mathematic expression using elements, attributes and entities - typical XML tools.

It is a must when you need to describe even complex mathematic formulas into a simple text document.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Daniele Protti, Project Manager and Software Architect

I have 20+ years experience in IT project management, software development and software architecture.

I have led several teams of software developers as project manager, quality manager and as team leader in different companies and different countries in sectors e.g. telecommunication, research & development, travel business, Internet marketing and Internet business, consultancy and services.

I have been responsible to collect the requirements of projects, applications and processes, design the databases and specify the final objects.

During my career I have accumulated a lot of experiences dealing with processes of any kind and the need to define the tools to manage them and collect the information.

Most of my tools have been written in VB, VBA, C++, C#, Java, PHP, Javascript using databases e.g. Informix, Postgres, Oracle and MySql.

I have organized all my experiences in courses which are not only a list of functions and methods but contain also my practical experiences and considerations about how to cope with the different situations and which solutions to suggest.

Ready to start learning?
Take This Course