May 2001
Intermediate to advanced
1088 pages
30h 13m
English
Assume you have an XML file that looks like the one shown in Listing 24.1.
<!ELEMENT people (person*)> <!ELEMENT person (first-name|middle-name|last-name)+> <!ELEMENT first-name (#PCDATA)> <!ELEMENT middle-name (#PCDATA)> <!ELEMENT last-name (#PCDATA)> |
Furthermore, you have two Java bean classes, People and Person, shown in Listings 24.2 and 24.3.
package usingj2ee.xml; import java.util.Vector; public class People implements java.io.Serializable { protected Vector personVec; public People() { personVec = new Vector(); } public Person[] getPerson() { Person[] retval = new Person[personVec.size()]; personVec.copyInto(retval); ... |
Read now
Unlock full access