Data Types, Literals and Variables

This section provides a quick introduction of data types used in XPath: Boolean, Number, String, and Node Set.

XPath supports 4 data types:

Boolean: A data type with two possible values: true and false. Operations that produce boolean type of data objects:

=     Equal to 
!=    Not equal to 
<     Less than
>     Greater than 
<=    Less than or equal to
>=    Greater than or equal to
or    Logical or
and   Logical and

Number: A data type representing floating-point numbers with double-precision defined by IEEE 754. Operations that produce numbers:

+     Addition
-     Subtraction
*     Multiplication
div   Division
mod   Remainder

String: A data type representing sequences of characters from the same character used by XML.

Node set: A data type representing unordered collections of nodes defined by Document Object Model (DOM).

Last update: 2014.

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

 DOM (Document Object Model) Programming Interface

 SAX (Simple API for XML) Programming Interface

 DTD (Document Type Definition) Introduction

 Syntaxes of DTD Statements

 Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating XML Documents Against Specified XML Schemas

 XSL (Extensible Stylesheet Language) Introduction

 XSLT (XSL Transformations) Introduction

 Java Implementation of XSLT

XPath (XML Path) Language

 What is XPath (XML Path)?

Data Types, Literals and Variables

 Evaluation Context

 Built-in Functions

 Expressions and Location Paths

 Using XPath in XSLT Templates

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 XML Notepad - XML Editor

 XML Tools Plugin for Notepad++

 XML 1.1 Changes and Parsing Examples

 Outdated Tutorials

 References

 PDF Printing Version