XML from Beginner to Expert
3.8 (11 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.
213 students enrolled
Wishlisted Wishlist

Please confirm that you want to add XML from Beginner to Expert to your Wishlist.

Add to Wishlist

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 (11 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.
213 students enrolled
Created by Daniele Protti
Last updated 1/2016
Current price: $10 Original price: $60 Discount: 83% off
1 day left at this price!
30-Day Money-Back Guarantee
  • 4 hours on-demand video
  • 2 Articles
  • 76 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • 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
View Curriculum
  • an advantage is to know some basic HTML
  • be familiar with computers and the Internet

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:



Organization of the course

The Overview of XML


Example of An XML document

Basic Rules




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



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


Formatting with XSL:FO

The formatting process


2nd Example - more complex


How to use XPath

Patterns for the match attribute

Patterns for the select attribute

XLink and XPointer

XLink and XPointer


Simple use of XLink

Complex links


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


Structure of a TEI-Lite document

Transform a TEI-Lite document




Who 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.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 94 Lectures Collapse All 94 Lectures 04:03:33
3 Lectures 09:06
About the author

Welcome to the Course - Introduction

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.

Introduction to XML
The Overview of XML
6 Lectures 13:07

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)

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

Example of XML document

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.

Preview 04:30

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.


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.


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

The XML Syntax
14 Lectures 26:08

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).

The Structure of an XML document

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

The Prologue

In this lesson we will see what the XML declaration is and how it is done in an XML file.
XML Declaration

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

Eleboration Instructions

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.

Information about the Grammar

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.


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.

Elements of the XML Document

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

Preview 01:14

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

The Nesting of Elements

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.

Naming of Tags

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.

Attribute of Tags: Semantic and Syntax of Attributes

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

This is explained in this lesson.

Attribute of Tags: Names of Attributes

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

Attribute of Tags: Values of Attributes

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.

Predefined Entities
The DTD Grammars
15 Lectures 35:56

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.

The DTD Grammars

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.

The Validation Tools

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.

Preview 09:09

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.

Internal and External Grammars

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.

The basis of XML Grammars

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.

The basis of XML Grammars - Document Type

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.

The basis of XML Grammars - Definition of the elements

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.

The basis of XML Grammars - Grammar of the Root element

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.

Preview 03:06

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.

The basis of XML Grammars - Number of elements

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.

The basis of XML Grammars - Selection between different elements

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

The basis of XML Grammars - Mixed content in the elements

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.

The basis of XML Grammars - Elements with any content

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.

The basis of XML Grammars - Elements without content

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.

The basis of XML Grammars - Sequences and subsequences
DTD and Entities
5 Lectures 14:20

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
DTD and Entities

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).

Syntax of the Internal Entities

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.

Syntax of the External Entities

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.

Syntax of the Parametrical Entities

DTD and Attributes
5 Lectures 16:21

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.

Attributes in the DTD grammars

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.

Types of Attributes and Modifiers

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.


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.


The Namespaces
8 Lectures 17:22

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.

The XML Namespaces

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

Why the XML Namespaces

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

Use the XML Namespaces

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

Syntax of the Namespaces

Attributes are also defined for the XML namespaces.

We will see how to define attributes for a namespace.

Attributes and Namespaces

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.

Preview 01:52

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.

An Application of Namespaces

Transform with XSLT
5 Lectures 15:24

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.

Transform with XSLT

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

1st Example of XSLT Transformation

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.

2nd Example of XSLT Transformation

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.


Formatting with XSL:FO
4 Lectures 11:24
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
The Formatting process

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.

Example I

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

Example II

5 Lectures 09:52

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.


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

How to use XPath

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.

Patterns for the match attribute

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.

Patterns for the select attribute

5 More Sections
About the Instructor
Daniele Protti
3.6 Average rating
253 Reviews
7,541 Students
14 Courses
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.