Ultimately, the XML object is manually exported reliably

Source: Internet
Author: User
Tags object change settings interface time limit access
xml| objects
Original

Ultimately, it's a good thing to manually export XML objects. January 06, 2005 and XML deal with, often is to laugh: Why do I have to spend so much effort and the entire XML document traffic? Actually, I just want to access the properties of one of the objects!! Some time ago to understand Castor think this is a solution, but also need to read and write the entire document update. One is that the time limit does not allow the current in-depth study, and that is not a mature project, and secondly, the adoption of words and the current digester read mode conflict, a bit of a row. However, as the department set up the frequency of updates seems to be more and more high, and then put into the XML read only by hand to change seems to be not. Therefore, the intention is to transplant the department objects into the database, but the first hand found that there are also not cost-effective places.

In fact, the discovery ignores a problem that is actually a contrast between XML and relational database storage: the means of XML peripheral access is not very mature, but it stores data in the hierarchy of objects, while relational databases are stored in a flat form. I'm currently going to use secion to convert to a relational database, in order to make it easier to change settings in a section, this is a file in XML, and a relational database, but a whole bunch of relational tables (the concept of relationships is also an entity, but this entity is not that entity, it means reacting to a bunch of tables of an object), And to be associated with such as table class, rather complex. This may not be a good idea at the moment, and the use of complex relational structures to express a small number of records in large projects appears to be a less costly and outdated approach. So, I hesitated.

Another way to do this is to make an updatable XML module: The processing techniques include:

1, modify the sectionbase, so that it is for a number of sections of the XML work, rather than as now all explain all the departments read in;

2, do an update of the various sections of the XML method, whether it is Casto, or other methods;

3, to do an update of the various sections of the interface, to connect it to the sections of the management desk.

The key here is the second step. To confirm that the second step can be done in the current simplest way, again to look at the previous download of the article on Castor, but the blog China is really more and more fragile, incredibly long time still can not move, it is long before the original article opened and read another article. The results of the study are still the same, if the adoption of Castor means to adopt its JDO, not just the output of XML, and currently my reading is mainly to use digester; so it contains a larger range of modifications, and includes a larger, more qualitative trial This is why I temporarily let go of Castor in the last two weeks: there is no time to delve into its use and practical application. It seems that only the original point of Sax or even string processing.

Consider the commonly used sax/xalan/jaxp/jdom several processing techniques, if not purely to the object of the document content work, it is necessary to write a xslt/and converters, and in any case, with the consistent Java object/xml object matching pattern work, You must also make the above document objects interchangeable with the Digester Java object: Never heard of it!! From the digester are not a few people really used the case, I think even on the forum to ask the few domestic and foreign brother is white. I think this method, if there is, must be in the specific use of digester, from the jdom to get the object, and to convert to the Document object-but no!!

It seems that I have to consider what it is and how reusable it is to be realized. ...... Think down, in fact, this is not difficult, just need to implement an interface in each class, such as write, and then step by step call not to do? Why roamed, find some unreliable things to try? Itong, actually manual output object string is not a scary thing, I was let those article author to Bluff, the key is that this is by object output, the program quantity is not big, and also very good management. Compared to writing servlet output, it's a trifle.

The original method is not necessarily backward, appropriate on the line!


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.