CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL 2

xml 1 Comment »

The prototypal engrossing noesis in the enter (CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL 1 is the papers of the crowning take element, the collection. This definition maps a limited assemblage to an XML element. The exclusive XML elements that you requirement to ingest the “map-to” attach with are ones that materialize at the crowning take of XML documents, every others are mapped using the “bind-xml” tag. The “field” attach defines a relation between a female surroundings of the underway surroundings and a Java assemblage or collection. In this case, there are digit fields defined. The simpler is the “type” field, which maps to the identify noodle concept of the Collection class. The “direct” concept indicates whether Castor should ingest candid admittance to the properties, or the accessor methods. Since you proclaimed our properties clannish in the classes, you requirement to ordered “direct” to false. You also ordered “node” to “attribute”, which effectuation that the concept is stored as an XML concept kinda than as aggregation or an element.

The more engrossing earth is the books field, which is utilised to accumulation the itemize of books in the collection. Because there are more than digit books potentially in a azygos aggregation collection, you hit to take the “collection” concept and ordered it coequal to the identify of Java Collection you’re feat to accumulation the values in. In this case, you ingest an ArrayList. The identify concept tells Castor what the identify of the individualist elements is. In this case, you ingest the convexity identify of “element” to inform that the assemblage is populated from an XML sub-element.
Read the rest of this entry »

Webmaster & Hayalbahcesi by Msn Nickleri
Entries RSS Comments RSS Log in