Skip to main content

Why jax-p api is given by sun people ?

Why jax-p api is given by sun people ?
👉in simple way jax-p is an Api which is basically used for to read the content of Xml. ......but now we have to know why jax-p is came even though there is any other way is available to read the content of Xml. ..
🌎Think how many way we can read the content of Xml ?
1 . By using FileInputStream...
(But here problem is as a programmer we have to write the complicated logic to read Xml by FileInputStream..For multiple times and code will be duplicate also. ..so which is not a good approach. )
2 . By using 3rd party libreries
Means
Xml4j
DOM4j etc...
(But here is again we face problem. Here we can avoid code duplication but problem is code is not reusablity means Suppose I developed my project based on Xml4j .but Xml4j have certain limitation I.e it can't read Xml if that Xml contain more than 1lkh element. .so to avoid this I want to use DOM4j insted of Xml4j. ...so in that case we have to rewrite the code again. .....
Which affects more in case of mentainance,and testing which increases the cost of projects. ...)
So to overcome this problem sun people develop an interesting api called as jax-p. Which support 2 api to read content of Xml in easy way and less time. .I.e
SAXParser and DOMParser .....
And we can get direct support of jax-p in 1.5....but this features is available onwords jdk 1.4....
And for this Api several 3rd party vender provide implementation to get access to jax-p api like 
✔Crimson
✔Xerscer
✔Oracle v2 Parser etc....
Jax-p api designed completely based on abstract factory design pattern. ....

Comments

Popular posts from this blog

Mockito interview Questions

1.       Question 1. What Is Mockito? Answer : Mockito allows creation of mock object for the purpose of Test Driven Development and Behavior Driven development. Unlike creating actual object, Mockito allows creation of fake object (external dependencies) which allows it to give consistent results to a given invocation. 2.       Question 2. Why Do We Need Mockito? What Are The Advantages? Answer : Mockito differentiates itself from the other testing framework by removing the expectation beforehand. So, by doing this, it reduces the coupling. Most of the testing framework works on the "expect-run-verify". Mockito allows it to make it "run-verify" framework. Mockito also provides annotation which allows to reduce the boilerplate code. 3.       Question 3. Can You Explain A Mockito Framework? Answer : In Mockito, you always check a particular class. The dependency in that class is injected using m...

REST Methods

GET ============================================= HTTP GET method is used to **read** (or retrieve) a representation of a resource. According to the design of the HTTP specification, GET requests are used only to read data and not change it. Therefore, when used this way, they are considered safe. That is, they can be called without risk of data modification or corruption. Means calling it once has the same effect as calling it 10 times. Additionally, GET is idempotent which means that making multiple identical requests ends up having the same result as a single request. Donot expose unsafe operations via GET. It should never modify any resources on the server. Example: ------------    GET http://www.example.com/customers/12345/orders POST =================================== -> The POST verb is most-often utilized to **create** new resources. In particular, it's used to create subordinate resources. -> That is, subordinate to some other (e.g. parent) reso...