Skip to main content
pelatihan
.org
Learn. Practice. Grow.
Category
EN
Sign in
Sign up
Menu
XML Curriculum: 12 Chapters, 110 Lessons — pelatihan.org
Home
/
Catalog
/
XML
/
Curriculum
Curriculum
XML Curriculum
Learn XML online with 110 structured lessons, code examples, and 550 quiz questions.
110 lessons
12 chapters
550 questions
Summaries and key points are free to preview. Full lessons, code examples, and quizzes require a subscription.
01
XML Tutorial
20 lessons
01
XML HOME
The XML homepage introduces XML (eXtensible Markup Language) as a markup language for defining, storing, and moving data. Unlike HTML, XML does not have built-in tags so writers…
02
XML Introduction
XML is a markup language designed to store and carry data, not display data. XML is platform-independent, text-based, and supports Unicode so it is easy to read by both humans…
03
XML How to use
XML is used for a variety of purposes: storing data in files, configuring applications, becoming a standard format for intersystem data exchange, and sending documents over a web…
04
XML Tree
XML is structured like a tree: there's one root element that clusters the child element, and each child can have another child. Each element has an opening tag, a content tag,…
05
XML Syntax
XML syntax has strict rules for valid documents to be parsed: each element must be closed, the attribute must be quoted, the writing is case-sensitive, and the comment is written…
06
XML Elements
XML elements consist of the opening tag, content (text, attribute, or child), and the closing tag. The name of the element should begin with a letter or underscore, should not…
07
XML Attributes
The XML attribute provides additional information about the element and is written in the opening tag with the name="value" pattern. The attribute must have a value in the form…
08
XML Namespaces
XML namespaces prevent name collisions when two different libraries use the same element name, e.g. <harga> of the store module and tax module. Namespace is declared via the…
09
XML Display
The browser does not display XML as it is; the browser considers XML as data and only displays it as a text tree. To enhance the look, XML can be linked to an XSLT or CSS style…
10
XML HttpRequest
XMLHttpRequest is a browser-built object that allows web pages to send and receive data from servers asynchronously without reloading pages. Despite its XML name, this object can…
11
XML Parser
An XML parser is a program that reads XML documents and makes sure they are well-formed before further processing. Each browser generally has a built-in XML parser, while on the…
12
XML DOM
A DOM (Document Object Model) converts an XML document into a tree object that can be accessed and modified through a programming language. Each element, attribute, and text…
13
XML XPath
XPath is a query language for specifying parts of an XML document based on a path pattern. With expressions like /store/book/title, we can pick specific elements from the tree…
14
XML XSLT
XSLT (Extensible Stylesheet Language Transformations) is a language for converting XML documents into other output such as HTML, new XML, or text. The transformation process uses…
15
XML XQuery
XQuery is a query language for extracting and manipulating data from a set of XML documents, similar to SQL for relational databases. XQuery uses the FLWOR expression (for, let,…
16
XML XLink
XLink (XML Linking Language) allows XML elements to link to other sources, both within the interdocument and within the same document. XLink supports simple links as well as web…
17
XML Validator
XML validators check whether a document meets XML rules, either rules of well-formedness or scheme rules such as DTD or XSD. The test results help developers find data structure…
18
XML DTD
Document Type Definition (DTD) is a classical scheme that defines the structure of an XML document: which elements may appear, their order, and whether they are mandatory or…
19
XML Schema
XML Schema (XSD) is a richer DTD substitute because it is written in XML format and supports data types such as integers, dates, and booleans. In addition to the structure, the…
20
XML Server
The server can present data in XML form via an HTTP response, for example when a page requests a list of products or the latest news. A server-side script like PHP, ASP, or Java…
02
XML AJAX
10 lessons
01
AJAX Introduction
AJAX (Asynchronous JavaScript And XML) is a web page building technique that updates data partially via asynchronous requests to servers, without reloading the entire page. AJAX…
02
AJAX XMLHttp
XMLHttpRequest is a core AJAX object created with new XMLHttpRequest() in modern browsers. Once the object is created, the next step is to call open() to specify the method and…
03
AJAX Request
After the open() is called, the request is actually sent by the send() method. For GET requests, data is usually included in the URL, while for POST data is sent via the request…
04
AJAX Response
Once the server responds, the result is read through the responseText property for text or responseXML for XML documents. Callback onreadystatechange is used to ensure the status…
05
AJAX XML File
AJAX can load static XML files from a server, such as a catalog or news list, and then display them to a page. Once a GET request is sent, the response is read with responseXML…
06
AJAX PHP
PHP is often used as a server-side in AJAX applications because it is capable of reading databases, processing data, and then sending it as XML or JSON. Simply set the correct…
07
AJAX ASP
Active Server Pages (ASP) is a classic server scripting technology that can set up data for AJAX pages, for example generating XML from internal data sources. The client calls…
08
AJAX Database
AJAX accesses the database indirectly: the browser requests the server script, the server script runs the query, and the result is sent back as XML or JSON. This pattern keeps…
09
AJAX Applications
AJAX is used in many real-world web applications: live search suggestions, content uploads increase as you scroll, form validation without reloading, updated shopping cart…
10
AJAX Examples
AJAX example pages typically display several basic patterns at once: load text from a file, take server time, display lists from XML, and send form data. These examples show the…
03
XML DOM
15 lessons
01
DOM Introduction
A Document Object Model (DOM) is a representation of an XML or HTML document shaped like an object tree that is loaded into memory. Through the W3C-standardised DOM API, programs…
02
DOM Nodes
In DOM, each part of an XML document is represented by a node. Common types of nodes are elements, attributes, text, comments, documents, and documentFragments. Understanding the…
03
DOM Accessing
DOM provides many ways to access nodes: getElementById for a specific id, getElementsByTagName and getElementsByClassName for a set of elements, as well as querySelector for CSS…
04
DOM Node Info
Each node has basic information in the form of nodeName, nodeValue, and nodeType. nodeName contains the name of the element or the # sign for the text, nodeValue contains values…
05
DOM Node List
Selection results such as getElementsByTagName or childNodes are a set of nodes that are accessed based on index and length. Each member is taken with item(i) or square brackets…
06
DOM Traversing
Tracking the DOM tree means moving from one node to another through hierarchical relationships. The childNodes property returns the entire child including the text, whereas the…
07
DOM Navigating
In addition to downward, the DOM allows navigation around the node: parentNode or parentElement to parent, nextSibling and previousSibling to sibling in parallel. You have to…
08
DOM Get Values
The value of the node is taken with the textContent for all the text in it, or the innerHTML that comes with the markup. Attributes are read with getAttribute. When displaying…
09
DOM Change Nodes
Changing a document through DOM can be done by replacing the textContent or nodeValue for the text, and the attribute set for the attribute. The changes are directly visible on…
10
DOM Remove Nodes
The node is removed from the tree by removing its parent's child, or by the remove() method on the node itself on the modern DOM. The deleted result nodes can still be stored in…
11
DOM Replace Nodes
Old nodes can be replaced with new nodes through the parent-owned replaceChild, which receives new nodes and old nodes as arguments. When only text content is needed, textContent…
12
DOM Create Nodes
New nodes are created with createElement for elements, createAttribute for attributes, and createTextNode for text. The output of the creation has not been connected to the tree…
13
DOM Add Nodes
The already created nodes are attached to the tree using the appendChild at the end of the child list, or insertBefore to place before a particular node. Modern APIs provide more…
14
DOM Clone Nodes
The cloneNode makes a copy of a node. With the parameter false only the node itself is copied, whereas with true the entire descendant subtree is copied. The resulting copy has…
15
DOM Examples
Example-example DOM enables combined use: build a list of data, change the price text, delete items, to copy row templates. You see a consistent DOM workflow: select nodes,…
04
XPath Tutorial
6 lessons
01
XPath Introduction
XPath is an expression language for selecting the XML document portion based on a path pattern, e.g. /store/book[1]/title. Because selection is expressed in one expression, the…
02
XPath Nodes
XPath recognizes seven types of nodes: root, element, attribute, text, namespace, processing instruction, and comment. Each type has its own writing method, e.g. @ for attribute…
03
XPath Syntax
XPath syntax consists of selecting nodes with the path (/, //,.,..), wildcard (*), predicate filter [..], and merging with the symbol. There are also functions such as count(),…
04
XPath Axes
XPath axes define the relationship between the context node and the node being searched for, for example ancestor, descendant, following-sibling, and preceding. Each axis is…
05
XPath Operators
XPath provides comparison operators (=,!=, <, >), arithmetic (+, -, *, div, mod), logic (and, or), as well as node merging (). Boolean values can be formed from comparisons and…
06
XPath Examples
A practical example of XPath shows how the expression selects real data: take the most expensive book title, filter by attribute, count the number of items, to pick the first…
05
XSLT Tutorial
14 lessons
01
XSLT Introduction
XSL (Extensible Stylesheet Language) is a family of technologies for formatting and transforming XML documents. The main parts are XSLT for transformation, XPath for node…
02
XSL Languages
The term XSL includes three languages with different roles: XSLT for transformation, XPath for navigation and node selection, and XSL-FO for output layout. XSLT and XPath…
03
XSLT Transform
The XSLT transformation is done by pairing XML source documents and XSL stylesheets into XSLT processors, and then generating a new output tree such as HTML or other XML. The…
04
XSLT <template>
Templates are the main rule blocks in XSLT that are declared with <xsl:template> and called when the match pattern matches. In the template, the application-templates forward the…
05
XSLT <value-of>
<xsl:value-of> is an XSLT element that takes the value of a string from an XML node and writes it to the transformation output. The expression on the select attribute determines…
06
XSLT <for-each>
<xsl:for-each> repeats the output block for each node in the select expression result node-set. Within the block you are free to use <xsl:value-of>, <xsl:if>, or other elements…
07
XSLT <sort>
<xsl:sort> is used in <xsl:for-each> or <xsl:apply-templates> to change the order of iterations based on the value of an element or attribute. You can set the data type, the…
08
XSLT <if>
<xsl:if> executes the block content only if the expression on the test attribute is worth true. This element has no else branch; for other branches use…
09
XSLT <choose>
It provides if-else branching within XSLT 1.0. It contains one or more <xsl:when> with test attributes, as well as an optional one <xsl:otherwise> as a branch if all false. This…
10
XSLT Apply
<xsl:apply-templates> calls other templates whose match pattern matches the selected node. Unlike for-each which processes on-site, apply-templates move the processing stream to…
11
XSLT on the Client
XSLT can be run directly in the browser (client-side) by inserting the xml-stylesheet processing instruction into the XML file. The browser reads the XSL file, then renders the…
12
XSLT on the Server
XSLT can also run on servers using processors such as XSLTProcessor in PHP, XslCompiledTransform in .NET, or Transformer in Java. The server sends the result of the…
13
XSLT Edit XML
XSLT not only changes the look, but it can also generate new XML so it's useful for modifying or adding XML data. By combining the element constructor and the <xsl:copy-of>, you…
14
XSLT Examples
The XSLT example page features some complete transformations, such as CD catalogs, flower galleries, and family trees. The patterns used are always the same: template match, then…
06
XQuery Tutorial
9 lessons
01
XQuery Introduction
XQuery is a standard W3C query and functional language for retrieving, manipulating, and modifying XML data, often called its XML SQL. XQuery is built on XPath 2.0/3.0 so that…
02
XQuery Example
The XQuery query works by selecting nodes from XML documents using XPath expressions, e.g. doc("cd.xml")/catalog/cd) and then filtering with a predicate. The result of the query…
03
XQuery FLWOR
FLWOR stands for For, Where, Order by, and P0 which is the most powerful query form in XQuery. This pattern allows iteration, variable shelter, filtering, sequencing, and the…
04
XQuery HTML
FLWOR can generate HTML fragments directly so that XQuery queries can be the layer of web application display. By writing the HTML element constructor in the return section, XML…
05
XQuery Terms
The XQuery query is composed of two main parts: a prologue containing declarations and a play expression in the form of evaluated expressions. Prologues are used to declare the…
06
XQuery Syntax
The XQuery syntax is case-sensitive and is written as an XML expression that combines element constructors, XPath, and FLWOR clauses. Queries can be prologues, expressions, or…
07
XQuery Add
XQuery can add data to XML documents through an element constructor and attribute, both direct constructor and computed constructor. In the FLWOR query, the return section is…
08
XQuery Select
Data selection in XQuery uses the full XPath path: / for root, // for derivative whatever its depth, and @ for attribute. Predicts in square brackets filter out nodes, for…
09
XQuery Functions
XQuery has many built-in functions in the namespace fn: such as fn:count(), fn:concat(), fn:upper-case(), and fn:current-dateTime(). You can also define the function itself by…
07
XML DTD
7 lessons
01
DTD Introduction
Document Type Definition (DTD) is a set of rules that define the elements, attributes, and structure of an XML document. DTDs can be declared directly within a document (internal…
02
DTD Building Blocks
The DTD block consists of an element declaration, an attribute declaration, an entity declaration, as well as a content type PCDATA and CDATA. PCDATA contains text that remains…
03
DTD Elements
The DTD element declaration is <!ELEMENT content name>, where the content can be EMPTY, ANY, #PCDATA, or a child list with operator, + *? The comma sign means mandatory order,…
04
DTD Attributes
The DTD attribute is declared with <!ATTLIST>, complete with the attribute name, its data type, and its presence rules. The presence rule is #REQUIRED (obligatory), #IMPLIED…
05
DTD Elements vs Attr
Elements and attributes can store similar information, but there are standard guidelines for selecting them. Attributes are suitable for short, single-text metadata, while long,…
06
DTD Entities
Entity is an abbreviation for value that can be reused in an XML or DTD document. XML provides five built-in entities for specific characters, while the entity itself is declared…
07
DTD Examples
Examples of DTDs show the use of internal and external subset in real-world scenarios such as store orders and notes. The same pattern repeats: declaration of sequential…
08
XSD Schema
16 lessons
01
XSD Introduction
XML Schema (XSD) is a language for defining the structure, content, and data type of an XML document, serving as a replacement for the richer DTD. XSD itself is written as an XML…
02
XSD How To
The step of creating an XSD scheme starts with the root element <xs:schema> containing the XSD namespace, then declaring the element and type according to the document structure.…
03
XSD <schema>
The <xs:schema> element is the root of any XML Schema file (.xsd) that defines the validation rules of an XML document. The xmlns:xs attribute sets the prefix xs for the XML…
04
XSD Elements
Simple elements are declared with <xs:element> which only carry names and types, so that the content is text value without children. Inbuilt types like xs:string, xs:integer, and…
05
XSD Attributes
<xs:attribute> is used to declare the attribute of an element with the same data type as a simple element. The attribute is stated in <xs:complexType> and is inherently optional,…
06
XSD Restrictions
<xs:restriction> limits the value of the built-in type to comply with business rules, such as text length, number range, or list of allowed values. The boundary elements within…
07
XSD Complex Elements
A complex element is an element that contains a child, attribute, or both, and whose structure is defined by <xs:complexType>. There are four main forms: empty, containing only…
08
XSD Empty
Empty elements are elements that must have no content or children, so they can only be attributed if they are declared. Syntactically, an empty element is denoted by…
09
XSD Elements-only
Elements containing only children are declared with <xs:complexType> that contain content models of xs:sequence, xs:choice, or xs:all. The attributes minOccurs and maxOccurs in…
10
XSD Text-only
Text-based elements that still require attributes should use <xs:simpleContent> within <xs:complexType>. Since simpleContent must not contain elements, it can only be…
11
XSD Mixed
Mixed content allows text to be freely mixed with child elements within one element, similar to paragraphs on an article document. This feature is activated with <xs:complexType…
12
XSD Indicators
The indicator determines how the child element is arranged: xs:sequence sequence, xs:choice one, and xs:all free sequence. The indicator can be wrapped in xs:group or…
13
XSD <any>
<xs:any> expands the content model to accept other elements that have not yet been declared in the schema, so that the structure remains open to extensible data. These elements…
14
XSD <anyAttribute>
<xs:anyAttribute> allows for additional attributes that are not declared in the scheme, so that the data can carry developer-owned extensible metadata. Like xs:any, it is placed…
15
XSD Substitution
Substitution group allows an element to replace another element in a data document, provided that the substitution element refers to the head element via the substitutionGroup…
16
XSD Example
The example page summarizes the entire concept of XSD into one complete scheme for the order document: global elements, complex types, mandatory attributes, restrictions, and use…
09
XSD Data Types
5 lessons
01
XSD String
XML Schema provides several types of text: xs:string accepts any character, xs:normalizedString replaces tabs and new lines with spaces, xs:token to cut out excess spaces, and…
02
XSD Date/Time
XML Schema has specific date and time types: xs:date, xs:time, xs:dateTime, xs:duration, as well as xs:gYear and its derivatives. The writing must comply with ISO 8601, e.g.…
03
XSD Numeric
The XML Schema is distinguished by the precision: xs:integer for integers, xs:decimal for exact decimals, and xs:float and xs:double for approximate numbers. Derivatives such as…
04
XSD Misc
In addition to text, numbers, and dates, XML Schema has mixed types: xs:boolean for true/false, xs:hexBinary and xs:base64Binary for binary data, xs:anyURI for links, and…
05
XSD Reference
The ref attribute allows one element to refer to another global element so that the declaration is written enough once. A common pattern is to place global elements such as…
10
Web Services
5 lessons
01
XML Services
XML is often used as an intersystem data service format because it is text-based, cross-platform, and easy to validate. An application can exchange XML documents over HTTP with…
02
XML WSDL
WSDL or Web Services Description Language is an XML document that describes a web service: any operation available, the format of the message, the protocol used, and the endpoint…
03
XML SOAP
SOAP or Simple Object Access Protocol is an XML-based messaging protocol for exchanging structured information. Each envelope-shaped message contains optional Header and…
04
XML RDF
The RDF or Resource Description Framework is a framework for expressing knowledge in the form of a threefold: subject, predicate, and object. RDF data is often written with XML…
05
XML RSS
RSS or Really Simple Syndication is an XML format for automatically disseminating the latest news and articles. The structure is simple: the <rss> element with the version…
11
XML Examples
3 lessons
01
XML Examples
The XML example page shows real-world XML applications, ranging from RSS feeds, SOAP messages, WSDL service descriptions, SVG graphics, to application configurations. The same…
02
XML Syllabus
XML syllables map learning paths from syntax basics, element naming and attributes, to XPath, XSLT, XQuery, DTD, XSD, as well as service technologies such as SOAP and WSDL. This…
03
XML Study Plan
A realistic XML learning plan divides time into small blocks: basic syntax, XPath and XSLT, DTD/XSD validation, then mini projects like RSS feeds or configuration files. The key…