Well, this post is about different java XML parser comparative study. When you get opportunity to parse any XML , first of all you should know few things: how much size of xml? how frequently you want to parse XML? whether you want to write or read? how complex structure of your xml? how much memory do you have in application server? You can better judge the and choose the parser if you know the basic things about your xml structure and all.
Continue reading Different XML parser Comparison
This post is about validation of XML content or node, using XSD (XML Schema Definition) language in java language. if you have xml you can write logic to in xsd class in which you can write your logic: what are the node name, what type of data, how much occurrence of node , with what type of value etc.
Continue reading SAX Parser : Schema Validator in Java
You have a XML file which you have to validate whether format or data of incoming xml is valid or not. what will you do to achieve this, whether you read and then check one by one or at one go validate all node/elements.
Continue reading DOM Parser: Schema Validator in Java
You know ,
java.util.Date is the complex object, and parsing from string to
Date is little bit complex. but don’t worry, it can be simple once you know the basic things.
JAXB supports to customize marshaling and de-marshaling of
java.util.Date object, meaning that , you can customize your own format of data in xml and and java object. You have to defined
XmlAdapter which control the customization of your data format.
Continue reading JAXB: Date Format Example in Java
You know, reading from memory and reading from disk, which one is faster? The answer is straight forward, everyone says memory will be faster. And you know Tree data structure is faster. So, DOM is inspired by in-memory loading and Tree data structure.
Continue reading Difference Between DOM and SAX parser in java
In this post, I tried to demonstrate how to write XML document in file or console using DOM parser. Writing a XML document using DOM (Document Object Model) parser in java is very easy.
Continue reading DOM Parser: How to write XML file in java
In this post, I tried to demonstrate, how to read XML for either getting its content of element or name of element or comment in the XML or attribute value of any element by using DOM (Document Object Model) parser in java. In your professional life, while developing, you must encountererd most of the time to read of XML either configuration file or any other XML.
How to unmarshal and marshal java Map (key/value ) where the key can be a string and value can be a java object. You can implement inbuilt in java class in JAXB i.e.
XmlAdaptor for this type of mapping in JAXB (Java Architecture for XML Binding).
Continue reading JAXB: XmlAdaptor Example with Java Map
This example demonstrate nested object meaning that , one container class which hold reference of another class. Let say , container class is Employee which hold reference of Address or list of Address , then how you bind in JAXB 2.0.
Continue reading JAXB: Example of Nested List of XML Element
Well, in this post I tried to explain different type of Annotations used in JAXB API the annotation as: @XmlRootElement, @XmlType, @XmLElementWrapper, @XmlAttribute, @XmlAccessorType @XmlJavaTypeAdapter
Continue reading Annotation in JAXB