Read XML File in Java using DOM parser example
In this tutorial we are going to see how to use the built in Java DOM parser in order to parse an XML file into a DOM Object As you might know, the DOM object has the classic Tree Structure with nodes,...
View ArticleModify XML File in Java using DOM parser example
With this tutorial we shall show you you can read and modify the contents of an XML File using a DOM parser. The basic idea is pretty straight forward. You read the XML File and use a DOM parser to...
View ArticleCreate XML File in Java using DOM parser example
In this tutorial we are going to see how to create XML File in Java using DOM parser. The basic idea is very simple. You construct the DOM object with the tree structure you want in the memory, and...
View ArticleCount XML Elements in Java using DOM parser example
In this example we are going to see how to count elements with specific tag names using a DOM parser in Java. Basically all you have to do in order to count elements in an XML elements is: Open and...
View ArticleRead XML File in Java using SAX parser example
In this tutorial we are going to see how you can parse an XML File using a SAX parser. SAX parsers are very popular and much more frequently used than DOM parsers. The reason is that they are much more...
View ArticleRead UTF-8 XML File in Java using SAX parser example
In the previous SAX parser tutorial we saw how to parse and read a simple XML File. If your file had UTF-8 encoding, there is a chance that the client produced a MalformedByteSequenceException. In...
View Article