core java
-
DOM
Visit nodes in DOM document recursively
With this example we are going to demonstrate how to visit recursively the nodes in a DOM Document. We have…
Read More » -
DOM
Pretty print XML in Java
This is an example of how to pretty print an xml file in Java. We have implemented a method, that is…
Read More » -
DOM
Copy nodes subtree from one DOM document to another
In this example we shall show you how to copy the Nodes Subtree from one DOM Document to another. We…
Read More » -
DOM
Create empty DOM document
With this example we are going to demonstrate how to create an empty DOM Document, that represents the entire HTML…
Read More » -
DOM
Parse XML file with DOM
This is an example of how to parse an xml file using a DOM Document. The DOM Document interface represents…
Read More » -
SAX
Get element attributes in SAX XML parsing
In this example we shall show you how to get an Element’s Attributes using SAX XML parsing. Simple API for…
Read More » -
SAX
Parse XML file with SAX
With this example we are going to demonstrate how to parse an XML file with SAX. Simple API for XML…
Read More » -
threads
Dinning Philosophers deadlock example
This is an example of the Dining Philosophers’ problem. A short description of the problem shows that there are N…
Read More » -
threads
Application exits when all daemon threads exit
In this example we shall show you how to create a daemon thread in order to force an application to…
Read More » -
threads
Daemon Thread example
With this example we are going to demonstrate how to create a daemon Thread. We have implemented a class, MyDaemonThread,…
Read More »