Blog Archives

XML Parsing with JAXB implementation called MOXy

Step 1:Create a new Java project via Maven as shown below, and import the project into eclipse IDE.

Step 2: The pom.xml file with the MOXy dependency.

Step 3: Create a new “Source Folder” named, src/main/resources and then sub-folder “date” to create the xml file report.xml as shown…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in JAXB Tutorial, member-paid, XML and Java Tutorial

Java and XML tutorial with DOM Parser

Q. What is a DOM parser, and when will you use it? A. The Java DOM API for XML parsing is intended for working with small to medium XML documents as an object graph in memory. The DOM parser traverses the XML file and creates the corresponding DOM objects linked together…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, XML and Java Tutorial

Java and XML tutorial with SAX parser – reading only

Q. What is a SAX Parser and when will you use it? A. SAX  (Simple API for XML) is a stream oriented API like StAX, but Unlike StAX, which can read and write, but SAX can only read. Unlike StAX, which can’t validate schema, SAX can perform schema validation. SAX works…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, XML and Java Tutorial

Java and XML tutorial with Stax Parser – writing cursor based and iterator based

Here is a simple example to write employee object to XML using simpler cursor based approach.

Output:

Here is a simple example to write employee object to XML using simpler iterator based approach.

Output:

...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, XML and Java Tutorial

♥ Java and JAXB Tutorial – Marshaling

This blog posts extends Java and JAXB tutorial: Unmarshalling. Q. Can you create your Java objects from XSDs? A. Yes, you can by binding a schema. Binding a schema means generating a set of Java classes that represents the schema. All JAXB implementations provide a tool called a binding compiler to

Read more ›

Posted in XML and Java Tutorial

♥ Java and JAXB tutorial – unmarshalling

Q. What does JAXB stand for? What is an XML Binding? A. JAXB means Java API for Xml Binding. XML binding maps an XML to in-memory Java objects. The principle advantage of using JAXB when marshaling and demarshaling XML is that is simplifies the programming model by allowing us to simply

Read more ›

Posted in XML and Java Tutorial

Java and XML tutorial with StAX parser – reading

Q. What is a StAX Parser and when will you use it? A. The StAX Java API for XML processing is designed for parsing XML streams, just like the SAX API’s, but StAX is a “pull” API whereas SAX is a “push” API. StAX can do both XML reading and writing

Read more ›

Posted in XML and Java Tutorial

XML processing in Java overview with a Stax reader example

Q. What APIs do Java provide to process XML? What are the pros and cons of each, and when to use what? A.  SAX: Pros: Memory efficient and faster than the DOM parser. Good for very large files. Supports schema validation. SAX: Cons: You can use it for reading only.…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, XML and Java Tutorial

800+ Interview Q&As with lots of diagrams & code ♥Free | ♦FAQs | Hover/Slide for full text

open all | close all

200+ Java Interview FAQs – Quick Prep

open all | close all

16 Java Key Areas to be a top-notch

open all | close all

80+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all