XSL provides support for conditional patterns, statements and values – much the same as any other programming language. The appropriate application of the available XSL functions allows you to implement each pattern.
Tag Archives: Example
Examples of XML technology (ies) implementations. Each example provides an overview and a relevant implementation in a supporting technology and / or standard.
How to output CDATA with XSL
A CDATA element can be used to present formatted data or an XML document on its own. The problem is that the XSLT processor will normally strip any leading and trailing whitespace, as well as carriage returns from an output XML document – unless instructed otherwise…
How to create a XML document
A newly created, in-memory, XML document is sometimes necessary for ad-hoc data manipulation and / or document generation.
How to read an XML attribute value
There are a number of methods to read an XML attribute value. We present two common methods here: Locate and read an element value using the XML DOM; or Locate and read an element using XPATH expressions.
How To Save Java Objects As XML
Integration between disparate systems sometimes require a mapping exercise between the protocol XML and the POJO you are using for data storage processing. Java defines a comprehensive binding framework – JAXB – which can be used for this task.
How to transform XML data with XSLT
The example executes an XSL transform on a source XML document which generates a new result.
How to parse XML data values using XPATH
XML is a simple text format by design, however, XPATH defines multiple data types which allow for more robust calculation and comparison operations in XSLT and programming languages.
How to read an XML element value
There are a number of methods to read an XML element value. We present two common methods here: Locate and read an element value using the XML DOM; or Locate and read an element using XPATH expressions.
How to read an XML document
Reading / Opening an XML document is an essential skill for XML processing. The method of reading an XML document depends on the technical requirements (document source, code purpose, etc.) and constraints (processing speed, memory footprint, etc.).
