Home » xml

xml

Local Data Storage 7 – Serializing Java Objects to XML and Deserializing XML back to Java Objects

Working with Java and Files Tutorial Trail Read Write XML Files Random Access Files Like object serialization this is very easy and straight forward. Below is two examples of psuedo code for writing and then reading. This code merely shows the steps. We didn’t have to use the buffered streams. With small files you do not have to but with larger files it will speed up reading and writing. XMLEncoder Class //psuedo code does not run import java.beans.*; import java.io.*; public class SerializeToXML { public static void main(String args[]){ // an object, composition of objects or collection of objects AnObject anObject = new AnObject(); XMLEncoder encoder=null; try{ encoder=new XMLEncoder(new BufferedOutputStream(new FileOutputStream("objects.xml"))); }catch(FileNotFoundException fnfe){...

Local Data Storage 6 – Reading and Writing XML data files using Java

XML Data Files Working with Java and Files Tutorial Trail Serialize Objects to Files Serialize XML to Files In this post I will show you how to read and write data types in simple xml data files using XML DOM. DOM means Document Object Model. We are mainly concerned here with reading and writing some data of the same types we have been working with in previous articles. So i.e. xml data files <some document> <some element> <some data name=value/> <some data name="value"/> <some data> some text </some data> </some element> </some document> XML Documents XML document can be more complex with other parts to parse. In this, we have a document root which has as children which have children which have attributes which contain the data we want ...

HTML HyperText Markup Language

HTML Explained HyperText Markup Language When we say HTML, the first thought that comes to our heads is “what does HTML stand for?”. So let’s start at the beginning. HTML stands for HyperText Markup Language. In fact, it’s the markup language which is used to create web pages and applications which you view every day on the internet. Its pretty much what began the internet as most people know it. HTML facilitates a web designer to specify what content is needed to be displayed on a web page to be accessed later by us using a web browser. The current standard version of HTML is HTML 5.0, though HTML 4 is also still in wide use. Sell also Version 5.0 Documentation, Version 4 Documentation, Cascading Style Sheets But, before we go into more details about HTML, let̵...