What is the difference between SAX and DOM ?
👌Common questions in case of xml:-
= = = = = = = = = = = = = = = = = = =
Both are used for read the content of Xml .both are universal methodlogy independent on language we can say it is interprorable nature but based on requirements we have to use it
= = = = = = = = = = = = = = = = = = =
Both are used for read the content of Xml .both are universal methodlogy independent on language we can say it is interprorable nature but based on requirements we have to use it
👍SAX:-(simple access for Xml api)
= = = = = = = = = = = = = = = = = =
SAX is used for read content of Xml in sequencial order one after another so .And this all concept about sax based on event base processing model
👉1 . which is consume less memory
👉2 . performance wise very fast...
Fst parse point ur top part of Xml then read one by one. But if you want to just read Xml then it's better approach to use .
👉3.sax is read only api
👉4 . reading order is sequencial manner one by one
= = = = = = = = = = = = = = = = = =
SAX is used for read content of Xml in sequencial order one after another so .And this all concept about sax based on event base processing model
👉1 . which is consume less memory
👉2 . performance wise very fast...
Fst parse point ur top part of Xml then read one by one. But if you want to just read Xml then it's better approach to use .
👉3.sax is read only api
👉4 . reading order is sequencial manner one by one
👍DOM:-(Document object model )
= = = = = = = = = = = = = = = = = =
It is also used for read content of Xml but it is read in orbitary manner. It working based on hierarchy principle. .means it always creat a relationship in complex elements and simple elements of ur Xml so internally it read initially all the content and inside jvm it make an contentTree with root node with multiple child node. .....exactly in tree manner
= = = = = = = = = = = = = = = = = =
It is also used for read content of Xml but it is read in orbitary manner. It working based on hierarchy principle. .means it always creat a relationship in complex elements and simple elements of ur Xml so internally it read initially all the content and inside jvm it make an contentTree with root node with multiple child node. .....exactly in tree manner
👉1 . it takes more memory in comparison with SAX
👉2 . it is not faster. .
👉3. DOM is not only read we can perform write operation also
👉2 . it is not faster. .
👉3. DOM is not only read we can perform write operation also
But the benefit using it is u can travarse ur pointer for reading content of Xml as u want. That's why it develops by w3c organisation
I hope this theoritical description helps to u for understand. ....😃😃😃
Comments
Post a Comment