How to split Big XML File using Java Application

In this tutorial I am going to explain how to split the Big XML file into multiple XML files based on the specified element/node. In this example I am taking the following employee xml file, it contains name, personal details, work details and project details. Here I am going to split the employee xml ...
Continue Reading »

How to validate XML against XSD in Java

Java XML Validation API can be used to validate XML against an XSD. javax.xml.validation.Validator class is used in this program to validate xml file against xsd file. Here is the Sample XML file: <?xml version="1.0"?> <employee> <personalinformation> <firstname>Anil Krmar</firstname> <lastname>Anil Krmar</lastname> <dateofbirth>Anil Krmar</dateofbirth> <email>Anil Krmar</email> <telephone>9989762143</telephone> </personalinformation> <workdetails> <company>i3-software</company> <department>i3-software</department> <designation>i3-software</designation> <email>i3-software</email> <telephone>9989762143</telephone> </workdetails> <address> <personaladdress> <huseno>1-90/B</huseno> <street>KPHB COLONY</street> <city>KUKATPALLY</city> <state>AP</state> <postalcode>500072</postalcode> </personaladdress> <workaddress> <huseno>1-90/B</huseno> <street>KPHB COLONY</street> <city>KUKATPALLY</city> <state>AP</state> <postalcode>500072</postalcode> </workaddress> </address> </employee> Next step is to create the XSD from the XML file. We can create XSD from XML throug ...
Continue Reading »

JAXB Marshalling UnMarshalling using Generics

JAXB, stands for Java Architecture for XML Binding, using JAXB annotation to convert Java object to / from XML file. In this tutorial, we show you how to use JAXB to do following stuffs: Marshalling – Convert a Java object into a XML file. Unmarshalling – Convert XML content into a ...
Continue Reading »

Dynamic parameter stored procedure

If we have more parameters in a stored procedure and every parameter is optional to send the value to the procedure then based on the parameter values sent, the result set of records should be retrieved from the table. This is something like dynamic/optional parameter stored procedure. Example: create procedure sp_procedurename ( @parameter1 varchar(50)=null, @parameter2 varchar(50)=null, @parameter3 varchar(50)=null, @parameter4 int=null ) as begin select * from ...
Continue Reading »

Date Range Picker using the jQuery plugin example

In this article I am going to explain how to use the Date range picker plugin. This is a lightweight jQuery plugin, using this plugin we can choose the following date option in the HTML form elements. Today Last 7 days Month to date Year to date The Previous Month Specific Date All Dates Before All Dates After Date Range Below is the complete ...
Continue Reading »