Skip to content

DevWorkbench

  • Home
  • Links
  • About
  • Toggle search form

Category: Programming Examples

XSLT Example – “Joining” Different Nodes in One Document

In the previous example, we used two separate input files, but the same result can be created with just one file. First, the two files are concatenated and another node is added to act as a parent node. Here’s the input data: Combined XML File (combined.xml): In this case, the XSLT does not need to…

Read More “XSLT Example – “Joining” Different Nodes in One Document” »

Programming Examples

XSLT Example – Merging Two Documents

Yes, you can “join” two XML documents to create one with merged data, and it’s actually easier than you might think. I’ll provide a simple example with a “parent” document and a “child” document. We’ll use the <xsl:merge> instruction, which is specifically designed for merging documents in XSLT 3.0. Here’s a step-by-step example: Input XML…

Read More “XSLT Example – Merging Two Documents” »

Programming Examples

Java Examples – Date Parsing & Formatting

There’s many different ways to parse and format dates in Java. Here’s a simple example of just one way: All available date formats from the javadoc: Symbol Meaning Presentation Examples G era text AD; Anno Domini; A u year year 2004; 04 y year-of-era year 2004; 04 D day-of-year number 189 M/L month-of-year number/text 7;…

Read More “Java Examples – Date Parsing & Formatting” »

Programming Examples

Java Examples – Screen I/O

Screen I/O in Java is generally done using the `Scanner` class which is a part of the `java.util` package. Here’s a simple Java program example: An explanation of the example: Compile and run this program in a Java environment, and it will wait for the user to input a value, and then display the entered…

Read More “Java Examples – Screen I/O” »

Programming Examples

Copyright © 2025 DevWorkbench.

Powered by PressBook Masonry Dark