My Puropose: While client is navigating different pages,whatever data he enters using servlet I will store in session. Finally when client done navigating pages, I want to get data from session object & want to create xml file to fill up this data & send this xml file to database. P.S.: I don't want have XML template sitting on server so I can fill up values. I want to create XML file on fly to fill up data using java object. Thanks. Angela
Originally posted by Angela D'souza: ... Finally when client done navigating pages, I want to get data from session object & want to create xml file to fill up this data & send this xml file to database.
I am just curious to know, exactly what sort of value addition is achieved by using XML here? Are you working with an XML-aware database that can transform the XML document into proper SQL constructs?
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Ajith, Your post brings out a question in my mind. When can xml make considerable value addition? When one should go for xml? Tina
Alongwith being a good coder, try to be a good professional as well!
Joined: Mar 17, 2000
Here are some thoughts.. XML is not a silver bullet and I have seen many projects undergo unnecessary "XML-inclusion". Some of the best uses of XML include enterprise application integration and using XML as a distributed application protocol. That is where you get best bang for the buck. XML is also a great technology for capturing configuration information. Because it is extensible, flexibility can be added (almost) on the fly. In fact, it is the extensibility that makes XML lot better than plain vanilla properties files. With XML you can now add a "structure" to previously non-hierarchical config information. And then ofcourse, there is the birth-reason ie., separate data from presentation to support dynamic content formats. XML may not always be( and more than often it is not) a great inter-application solution. For instance, if you have an all Java system, you are better off making use of core Java language features for things such as remote method invocation, data representation, and packaging parameters or results( incidentally, all three happen to be potential areas for XML-ization) across subsystem boundaries. One has to realize using XMl does not come free and has its own overheads. Rule of thumb( that I use) is this - if all systems talk the same language and you don't need to expose them to outer world, you probably don't need XML for transport. Even when you need to open up your systems to outer world, if you are only talking with trusted parterns, investigate other EAI options including good old CORBA and messaging.
Joined: Mar 17, 2000
Coming back to my original question to Angela, in the absence of any specialized database support for representing queries as XML documents, packaging DB calls as XML document is unnecessary and adds to the overhead. I asked the question because it wasn't very clear in Angela's posts why XML is being considered in the first place. Angela wrote
Finally when client done navigating pages, I want to get data from session object & want to create xml file to fill up this data & send this xml file to database.