Technical 5 Box Set Chromecast, Linux, XML, PHP, Python pdf pdf
XML PROGRAMMING
THE ULTIMATE GUIDE TO FAST, EASY, AND
EFFICIENT LEARNING OF XML
PROGRAMMING (XML SYNTAX, XML
PROGRAMMING, DTD’S, XML PARSERS,
HTML5)
Table of Content
Introduction
Chapter 1 - What’s in a Markup language?
Chapter 2 - Why XML when there is HTML?
Chapter 3 - Show me the Syntax and Semantics
Chapter 4 - Document Type Definition
Chapter 5 - Get your hands dirty
Chapter 6 - Interpreting XML - XML Parsers
Chapter 7 - HTML5, why here?
Conclusion
Introduction
Have you ever felt learning XML as a nightmare? Discouraged by the huge volumes of beginner guides? I understand
the difficulty of extracting the core from a book which runs to few hundred pages. It is not very interesting to read few
thousand lines for creating a simple XML document on your own. How would you feel, if I say I can do that job for
you? I have read through hundreds of pages for you and will give you the ready to drink juice from the fruit.
This book is a quick and easy guide, an extract from those heavy pillow-sized books, menacingly long examples and
boring high level jargons. I wrote this book keeping in mind all the difficulties I faced as a beginner and thus the extract
is simple, understandable and short.
With this brief introduction, I request your attention and welcome you to travel through the book with me.
Chapter 1 - What’s in a Markup
language?
Like all human languages, computer languages are also developed for the purpose of communication. Human to
computer communication, computer program to computer program communication are supported by various computer
languages. Every language that is developed has a set of rules and procedures and we call them syntax. Languages can
be grouped based on the type of communication they are developed for.
Markup languages were primarily designed to instruct the software that displays text; they are designed to deliver
information over the World Wide Web. Markup is a meta data, when it is added to a text or document it enhances its
meaning. Precisely, markup language is a set of tags when added to a document can demarcate and highlight the various
parts of that document.
Markup languages use tags which contain the necessary specifications for processing, defining and presenting a text.
One of the most popular markup languages is Hyper Text Markup Language, they have predefined semantics for
presentation. Their greater use is in describing the structure of a website semantically along with cues for presentation.
The predefined elements in a HTML include: headings, paragraphs, lists, tables, images, and hyperlinks.
This is how a simple HTML code looks like:
SNIPPET 1
Markup Language HTML
This is a sample HTML page
SGML stands for Standard Generalized Markup Language.
SGML is not in itself a document language.
Markup
HTML Page
XML Sample
tidbits
Plain text: John Mathews
HTML File (Displaying the plain text, using pre-defined tags):
Name
John Mathews
Did you find something inside the markup vessel?
Chapter 2 - Why XML when there is
HTML?
XML is an acronym for eXtensible Markup Language; they provide means to share data and information between
computer programs or computers. While HTML enables its users to process, define and present text using predefined
presentation semantics, XML is a meta-markup language. Unlike HTML or troff in XML there aren’t any predefined
tags, you need to create your tags and semantics as and how your communication demands. Also, XML concentrates on
describing the structure and meaning of a document, it does not show how a document will look like. It does not
describe the document’s format but style sheets can be used for formatting an XML document. Once the data is shared, it
is the receiving computer program’s discretion to interpret useful information from them. Initially, XML was created as a
means of web publishing but later, their usage unfolded in new arenas.
XML is human readable, language independent; it can be shared across platforms and OS independent. XML is not only
used to render HTMLs, it also renders raw data, which for instance can be processed and fed into databases. Now, there
would arise an obvious question, why XML, a simple text file can serve the purpose. Yes, a text file can very well be
shared across platforms and can carry raw data but, the structure of data shared cannot be defined beyond a table or
matrix in a text file. Whereas, XML can define relationship between entities, they can define hierarchical data structure.
SNIPPET 2
Coffee Table
Wooden Furniture
black
Rocking Chair
Wooden Furniture
brown
Bean Bag
Rexene Furniture
black
Wall Stickers
Wall Decor
blue
The snippet 2 with no additional information illustrates that the data in the XML represents the list of items in a store or
stock.
The following are some practical uses for XML:
Data transfer and storage: Snippet 2 is a perfect example for using XML for database records. XML uses tags to label
each field of information, thus making the process of data processing (searching, sorting, filtering, etcetera,) simple.
Web publishing documents: Style sheets can be added easily to XML to get the desired layout.
Exchanging information between computer programs: One of the most popular uses of XML among programmers is
their use in web services communication. XML can carry information across web services, independent of the language
or platform in which the web services are built.
Creating KVM and boot for operating system: This is one of the least known usages of XML. Kernel-based Virtual
Machine and a boot can be created using XML for any operating system.
Creating, formatting, storing, encoding and exchanging: Mathematical formulas, chemical molecular structures,
musical scores, DNA, RNA, protein sequence information, complex internet commerce transactions, astronomical data,
Genealogical Data, etcetera, can be created or exchanged in the desired format.
XML Based Operating System
XML-based internet operating system (XIOS) is a proposal made by a company named Xcerion, this OS runs inside a
web browser and expected to give a desktop computing experience with cloud-based computing benefits. There are
many benefits expected from the proposed OS and the most important one is XIOS will be the safest OS ever as it will
be immune to most of the malwares. The other advantages include: low development cost, data portability, platform and
hardware independent and built-in collaboration. With the entire proposed feature, XIOS is more than a thin client. It can
run applications locally, it can work offline, it can store files, it has a command line and it can collaborate and keep the
files synchronized across machines.
XML Based Interface Definition Language
WSDL - Web Services Description Language is one of the most important applications of XML. Where, WSDL is an
XML document which describes the functionalities offered by a web service. It also describes how to use the service
offered. This XML though human readable and editable, is mostly generated and consumed programmatically.
tidbits
Plain text: John Mathews
XML File (Transforming the plain text into consumable information, using user-defined tags):
John
Mathews
Isn’t XML worth exploring?
Chapter 3 - Show me the Syntax and
Semantics
Too much hype for a simple markup language isn’t it? Let us learn it, use it and see how good it is. The first step in
learning to use a language is to learn the rules it abides.
XML is not a programming language
Unlike programming languages, XML does not perform any computation or algorithm to process the data. It just holds
the data in a structural way, which can be interpreted by an XML Parser.
SNIPPET 3
Family Table
1
4
Table and Chair
John
4years
Corporate Table
2
6
Sofa
Peter
2years
Color Codes:
XML version and the type of encoding
Namespaces
Root Element
Elements
XML Declaration
If the XML includes a declaration then it should be the first line of an XML. In the snippet 3, the first line marked in
blue is the XML declaration, it usually begins with “
Where,
The element-name will be replaced with the actual element name, the element-name is case sensitive.
The category defines the type of data in the element-name.
The keyword EMPTY signifies the element will have no value.
The keyword ANY signifies the element can hold any type of content.
The following snippet shows with examples the various syntaxes for declaring the elements with children in DTD:
Declaring an element with multiple children
Declaring an element with either or children
Declaring an element with zero or one child
Declaring an element with zero or many children
Declaring an element with minimum one child
Declaring an element with only one child
The following snippet shows the syntax for declaring an attribute in DTD:
General Syntax
Mandatory Attribute Value
Optional Attribute Value
Fixed Attribute Value
Character Data type Attribute Value
Enumerator Attribute Value
Unique Id Attribute Value
Id Reference Attribute Value
Id Reference List Attribute Value
XML Name Attribute Value
XML Name List Attribute Value
Entity Attribute Value
Entity List Attribute Value
Notation Name Attribute Value
Pre defined XML Value Attribute Value
]>
Sigma 55-250mm
Canon 7D
Canon
An Example for Internal DTD is shown below:
An Example for external DTD and its corresponding valid XML is shown below:
The above DTD is saved as “camera.dtd”. The same is included in the XML, which abides to the standards of the DTD.
Sigma 55-250mm
Canon 7D
Canon
Are you ready to build your own XML?
Chapter 5 - Get your hands dirty
Can we try our luck? How can we apply what we learnt so far?
Here you go, let us try to create an XML document which is valid with respect to the “excursion.dtd” below:
]>
Just for a bite, before you proceed
Write an XML declaration.
Include the excursion.dtd.
See if you have identified the root element and other sub elements.
A valid XML must be well formed first.
Check if you map all the attributes right.
Look for the data types of the element and attribute values.
Once you have created your XML, validate it yourself with the DTD.
HILLY TREK
12/08/2015
YES
15/08/2015
YES
FOREST SAFARI
16/08/2015
YES
29/08/2015
YES
Chapter 6 - Interpreting XML - XML
Parsers
We learnt to create a well formed, valid XML. Did you say that? What? I couldn’t hear you.
Yes you are right, I need not say a valid XML is well formed; it is implicit that a Valid XML is well formed.
Back to the topic, we have an XML now and we need to know how to interpret it.
Parser is a program written to interpret a text or string. XML parser is therefore a program written to interpret an XML
document. Computers are useless unless they are instructed, so an XML parser instructs the computer program on how
to read the XML file. Parsers parse through the XML document for accessing or modifying the information present.
XML parsers have become an integral part of development platforms and popular browsers. The parsers can also
validate an XML on its nesting, declarations, etcetera, they also validate the XML against DTD or schema.
There are many types of XML parsers but the following two parsers are widely used:
DOM Parser
SAX Parser
DOM Parser
DOM is an acronym for Document Object Model. DOM creates an interface between the XML file and the computer
program which consumes it, this enables the program to update or access data from the XML file. This is the most
recommended parser from W3 consortium.
How DOM Works
A DOM parser creates an object model (tree structure) of the entire XML document, it parses through the XML in a
hierarchical order. The DOM parser breaks the XML into three components: Elements, Attributes and Data.
Where,
-Elements are the XML elements from the XML file.
-Attributes are the properties of the XML elements.
-Data is the actual data, which the attribute value or the element data.
SNIPPET 9
4
2
25
1
0
4
In the snippet 9, “organizer”, “emails”, “calls” and “messages” are the elements, “date” and “from” are the attributes of
the element “emails”. Where, the actual data are the values of the attributes “date” and “from” and the data from the
elements “emails”, “calls” and “messages”. Let us name this XML document as organizer.xml.
Parsing the XML document using DOM
Since a parser is used by a programming language to interpret an XML document, let see an example of DOM parsing in
java. The three components: elements, attributes and data are all represented by a java class called “Node”. Java API has
ready to use XML packages and DOM packages. These packages have necessary java classes and methods to help XML
interpretations.
To parse the XML document “organizer.xml”(The XML in Snippet 9) through the java program, we need to write a java
class. To write a java class which parse an XML document with the help of DOM parser, we must follow the steps
below:
Import all the necessary packages.
importjavax.xml.parsers.DocumentBuilderFactory;
importjavax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
importjava.io.File;
Create an instance of document builder.
DocumentBuilderFactorydbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilderdBuilder = dbFactory.newDocumentBuilder();
Parse the XML File through the document builder and create a document.
File xmlFile = new File(“/user/organizer.xml”);
Document doc = dBuilder.parse(xmlFile);
Extract the root element and create a loop that iterates from the root to child node. Get the values of the elements
and their respective attributes.
Extract the root element
Element rootNode = document.getDocumentElement();
Extract the sub elements
NodesubElementNode = document.getElementsByTagName(“emails”);
Extract the attributes and values
Element subElement = (Element) subElementNode;
String subElementAttribute = subElement. getAttribute(“date”));
Let us see a complete sample code in Java and its output, which demonstrates the parsing and extraction of data from the
“oraganizer.xml”(illustrated in Snippet 9).
Java Class
importjava.io.File;
importjavax.xml.parsers.DocumentBuilderFactory;
importjavax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
public class ReadOrganizerXML {
public static void main(String[] args){
File xmlFile;
DocumentBuilderFactorydbFactory;
DocumentBuilderdBuilder;
Document document;
NodeListelementsNodeList;
try {
xmlFile= new File(“/user/organizer.xml”);
dbFactory= DocumentBuilderFactory.newInstance();
dBuilder= dbFactory.newDocumentBuilder();
document= dBuilder.parse(xmlFile);
document.getDocumentElement().normalize();
System.out.println(“Root element :” + document.getDocumentElement().getNodeName());
elementsNodeList = document.getElementsByTagName(“organizer”);
for (inti = 0; i
THE ULTIMATE GUIDE TO FAST, EASY, AND
EFFICIENT LEARNING OF XML
PROGRAMMING (XML SYNTAX, XML
PROGRAMMING, DTD’S, XML PARSERS,
HTML5)
Table of Content
Introduction
Chapter 1 - What’s in a Markup language?
Chapter 2 - Why XML when there is HTML?
Chapter 3 - Show me the Syntax and Semantics
Chapter 4 - Document Type Definition
Chapter 5 - Get your hands dirty
Chapter 6 - Interpreting XML - XML Parsers
Chapter 7 - HTML5, why here?
Conclusion
Introduction
Have you ever felt learning XML as a nightmare? Discouraged by the huge volumes of beginner guides? I understand
the difficulty of extracting the core from a book which runs to few hundred pages. It is not very interesting to read few
thousand lines for creating a simple XML document on your own. How would you feel, if I say I can do that job for
you? I have read through hundreds of pages for you and will give you the ready to drink juice from the fruit.
This book is a quick and easy guide, an extract from those heavy pillow-sized books, menacingly long examples and
boring high level jargons. I wrote this book keeping in mind all the difficulties I faced as a beginner and thus the extract
is simple, understandable and short.
With this brief introduction, I request your attention and welcome you to travel through the book with me.
Chapter 1 - What’s in a Markup
language?
Like all human languages, computer languages are also developed for the purpose of communication. Human to
computer communication, computer program to computer program communication are supported by various computer
languages. Every language that is developed has a set of rules and procedures and we call them syntax. Languages can
be grouped based on the type of communication they are developed for.
Markup languages were primarily designed to instruct the software that displays text; they are designed to deliver
information over the World Wide Web. Markup is a meta data, when it is added to a text or document it enhances its
meaning. Precisely, markup language is a set of tags when added to a document can demarcate and highlight the various
parts of that document.
Markup languages use tags which contain the necessary specifications for processing, defining and presenting a text.
One of the most popular markup languages is Hyper Text Markup Language, they have predefined semantics for
presentation. Their greater use is in describing the structure of a website semantically along with cues for presentation.
The predefined elements in a HTML include: headings, paragraphs, lists, tables, images, and hyperlinks.
This is how a simple HTML code looks like:
SNIPPET 1
Markup Language HTML
This is a sample HTML page
SGML stands for Standard Generalized Markup Language.
SGML is not in itself a document language.
Markup
HTML Page
XML Sample
tidbits
Plain text: John Mathews
HTML File (Displaying the plain text, using pre-defined tags):
Name
John Mathews
Did you find something inside the markup vessel?
Chapter 2 - Why XML when there is
HTML?
XML is an acronym for eXtensible Markup Language; they provide means to share data and information between
computer programs or computers. While HTML enables its users to process, define and present text using predefined
presentation semantics, XML is a meta-markup language. Unlike HTML or troff in XML there aren’t any predefined
tags, you need to create your tags and semantics as and how your communication demands. Also, XML concentrates on
describing the structure and meaning of a document, it does not show how a document will look like. It does not
describe the document’s format but style sheets can be used for formatting an XML document. Once the data is shared, it
is the receiving computer program’s discretion to interpret useful information from them. Initially, XML was created as a
means of web publishing but later, their usage unfolded in new arenas.
XML is human readable, language independent; it can be shared across platforms and OS independent. XML is not only
used to render HTMLs, it also renders raw data, which for instance can be processed and fed into databases. Now, there
would arise an obvious question, why XML, a simple text file can serve the purpose. Yes, a text file can very well be
shared across platforms and can carry raw data but, the structure of data shared cannot be defined beyond a table or
matrix in a text file. Whereas, XML can define relationship between entities, they can define hierarchical data structure.
SNIPPET 2
Coffee Table
Wooden Furniture
black
Rocking Chair
Wooden Furniture
brown
Bean Bag
Rexene Furniture
black
Wall Stickers
Wall Decor
blue
The snippet 2 with no additional information illustrates that the data in the XML represents the list of items in a store or
stock.
The following are some practical uses for XML:
Data transfer and storage: Snippet 2 is a perfect example for using XML for database records. XML uses tags to label
each field of information, thus making the process of data processing (searching, sorting, filtering, etcetera,) simple.
Web publishing documents: Style sheets can be added easily to XML to get the desired layout.
Exchanging information between computer programs: One of the most popular uses of XML among programmers is
their use in web services communication. XML can carry information across web services, independent of the language
or platform in which the web services are built.
Creating KVM and boot for operating system: This is one of the least known usages of XML. Kernel-based Virtual
Machine and a boot can be created using XML for any operating system.
Creating, formatting, storing, encoding and exchanging: Mathematical formulas, chemical molecular structures,
musical scores, DNA, RNA, protein sequence information, complex internet commerce transactions, astronomical data,
Genealogical Data, etcetera, can be created or exchanged in the desired format.
XML Based Operating System
XML-based internet operating system (XIOS) is a proposal made by a company named Xcerion, this OS runs inside a
web browser and expected to give a desktop computing experience with cloud-based computing benefits. There are
many benefits expected from the proposed OS and the most important one is XIOS will be the safest OS ever as it will
be immune to most of the malwares. The other advantages include: low development cost, data portability, platform and
hardware independent and built-in collaboration. With the entire proposed feature, XIOS is more than a thin client. It can
run applications locally, it can work offline, it can store files, it has a command line and it can collaborate and keep the
files synchronized across machines.
XML Based Interface Definition Language
WSDL - Web Services Description Language is one of the most important applications of XML. Where, WSDL is an
XML document which describes the functionalities offered by a web service. It also describes how to use the service
offered. This XML though human readable and editable, is mostly generated and consumed programmatically.
tidbits
Plain text: John Mathews
XML File (Transforming the plain text into consumable information, using user-defined tags):
John
Mathews
Isn’t XML worth exploring?
Chapter 3 - Show me the Syntax and
Semantics
Too much hype for a simple markup language isn’t it? Let us learn it, use it and see how good it is. The first step in
learning to use a language is to learn the rules it abides.
XML is not a programming language
Unlike programming languages, XML does not perform any computation or algorithm to process the data. It just holds
the data in a structural way, which can be interpreted by an XML Parser.
SNIPPET 3
Family Table
1
4
Table and Chair
John
4years
Corporate Table
2
6
Sofa
Peter
2years
Color Codes:
XML version and the type of encoding
Namespaces
Root Element
Elements
XML Declaration
If the XML includes a declaration then it should be the first line of an XML. In the snippet 3, the first line marked in
blue is the XML declaration, it usually begins with “
Where,
The element-name will be replaced with the actual element name, the element-name is case sensitive.
The category defines the type of data in the element-name.
The keyword EMPTY signifies the element will have no value.
The keyword ANY signifies the element can hold any type of content.
The following snippet shows with examples the various syntaxes for declaring the elements with children in DTD:
Declaring an element with multiple children
Declaring an element with either or children
Declaring an element with zero or one child
Declaring an element with zero or many children
Declaring an element with minimum one child
Declaring an element with only one child
The following snippet shows the syntax for declaring an attribute in DTD:
General Syntax
Mandatory Attribute Value
Optional Attribute Value
Fixed Attribute Value
Character Data type Attribute Value
Enumerator Attribute Value
Unique Id Attribute Value
Id Reference Attribute Value
Id Reference List Attribute Value
XML Name Attribute Value
XML Name List Attribute Value
Entity Attribute Value
Entity List Attribute Value
Notation Name Attribute Value
Pre defined XML Value Attribute Value
]>
Sigma 55-250mm
Canon 7D
Canon
An Example for Internal DTD is shown below:
An Example for external DTD and its corresponding valid XML is shown below:
The above DTD is saved as “camera.dtd”. The same is included in the XML, which abides to the standards of the DTD.
Sigma 55-250mm
Canon 7D
Canon
Are you ready to build your own XML?
Chapter 5 - Get your hands dirty
Can we try our luck? How can we apply what we learnt so far?
Here you go, let us try to create an XML document which is valid with respect to the “excursion.dtd” below:
]>
Just for a bite, before you proceed
Write an XML declaration.
Include the excursion.dtd.
See if you have identified the root element and other sub elements.
A valid XML must be well formed first.
Check if you map all the attributes right.
Look for the data types of the element and attribute values.
Once you have created your XML, validate it yourself with the DTD.
HILLY TREK
12/08/2015
YES
15/08/2015
YES
FOREST SAFARI
16/08/2015
YES
29/08/2015
YES
Chapter 6 - Interpreting XML - XML
Parsers
We learnt to create a well formed, valid XML. Did you say that? What? I couldn’t hear you.
Yes you are right, I need not say a valid XML is well formed; it is implicit that a Valid XML is well formed.
Back to the topic, we have an XML now and we need to know how to interpret it.
Parser is a program written to interpret a text or string. XML parser is therefore a program written to interpret an XML
document. Computers are useless unless they are instructed, so an XML parser instructs the computer program on how
to read the XML file. Parsers parse through the XML document for accessing or modifying the information present.
XML parsers have become an integral part of development platforms and popular browsers. The parsers can also
validate an XML on its nesting, declarations, etcetera, they also validate the XML against DTD or schema.
There are many types of XML parsers but the following two parsers are widely used:
DOM Parser
SAX Parser
DOM Parser
DOM is an acronym for Document Object Model. DOM creates an interface between the XML file and the computer
program which consumes it, this enables the program to update or access data from the XML file. This is the most
recommended parser from W3 consortium.
How DOM Works
A DOM parser creates an object model (tree structure) of the entire XML document, it parses through the XML in a
hierarchical order. The DOM parser breaks the XML into three components: Elements, Attributes and Data.
Where,
-Elements are the XML elements from the XML file.
-Attributes are the properties of the XML elements.
-Data is the actual data, which the attribute value or the element data.
SNIPPET 9
4
2
25
1
0
4
In the snippet 9, “organizer”, “emails”, “calls” and “messages” are the elements, “date” and “from” are the attributes of
the element “emails”. Where, the actual data are the values of the attributes “date” and “from” and the data from the
elements “emails”, “calls” and “messages”. Let us name this XML document as organizer.xml.
Parsing the XML document using DOM
Since a parser is used by a programming language to interpret an XML document, let see an example of DOM parsing in
java. The three components: elements, attributes and data are all represented by a java class called “Node”. Java API has
ready to use XML packages and DOM packages. These packages have necessary java classes and methods to help XML
interpretations.
To parse the XML document “organizer.xml”(The XML in Snippet 9) through the java program, we need to write a java
class. To write a java class which parse an XML document with the help of DOM parser, we must follow the steps
below:
Import all the necessary packages.
importjavax.xml.parsers.DocumentBuilderFactory;
importjavax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
importjava.io.File;
Create an instance of document builder.
DocumentBuilderFactorydbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilderdBuilder = dbFactory.newDocumentBuilder();
Parse the XML File through the document builder and create a document.
File xmlFile = new File(“/user/organizer.xml”);
Document doc = dBuilder.parse(xmlFile);
Extract the root element and create a loop that iterates from the root to child node. Get the values of the elements
and their respective attributes.
Extract the root element
Element rootNode = document.getDocumentElement();
Extract the sub elements
NodesubElementNode = document.getElementsByTagName(“emails”);
Extract the attributes and values
Element subElement = (Element) subElementNode;
String subElementAttribute = subElement. getAttribute(“date”));
Let us see a complete sample code in Java and its output, which demonstrates the parsing and extraction of data from the
“oraganizer.xml”(illustrated in Snippet 9).
Java Class
importjava.io.File;
importjavax.xml.parsers.DocumentBuilderFactory;
importjavax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
public class ReadOrganizerXML {
public static void main(String[] args){
File xmlFile;
DocumentBuilderFactorydbFactory;
DocumentBuilderdBuilder;
Document document;
NodeListelementsNodeList;
try {
xmlFile= new File(“/user/organizer.xml”);
dbFactory= DocumentBuilderFactory.newInstance();
dBuilder= dbFactory.newDocumentBuilder();
document= dBuilder.parse(xmlFile);
document.getDocumentElement().normalize();
System.out.println(“Root element :” + document.getDocumentElement().getNodeName());
elementsNodeList = document.getElementsByTagName(“organizer”);
for (inti = 0; i