Server Technology PPNT Manuel d'utilisateur Page 74

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 95
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 73
Java Servlets: XML Manipulation(1/2)
Java SE 1.4+ includes library for manipulating XML data
Element root = documen t.cr eate Elem ent( "Cou rse" );
document.appendChild(root);
...
Connection connection = DriverManager.getConnection(...);
Statement statement = connection.createStatement();
ResultSet result = sta teme nt.e xecu teQu ery( "SEL ECT * FROM " + dbms_db_table_);
while(result.next()){
String name = result.g etSt ring ("na me") ;
Element el_name = docu ment .cre ateE leme nt(" name ");
Text na me_ text = document.crea teTe xtNo de(n ame) ;
el_name.appendChild(name_text);
student.appendChild(el_name);
}
(74/95)
Vue de la page 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 94 95

Commentaires sur ces manuels

Pas de commentaire