1 package net.sourceforge.phpeclipse.wizards.actions.data;
3 import net.sourceforge.phpeclipse.wizards.xml.ModelUtil;
5 import org.w3c.dom.Document;
6 import org.w3c.dom.Element;
8 import com.quantum.extensions.IDataExtension;
9 import com.quantum.model.Column;
10 import com.quantum.model.xml.XMLToModelConverter;
11 import com.quantum.util.StringMatrix;
13 public class PHPDataWizard implements IDataExtension {
18 * @see com.quantum.extensions.IDataExtension#run(org.w3c.dom.Document)
20 public void run(Document doc) {
21 Element root = doc.getDocumentElement();
23 // matrix contains the actual selected data in the row:
24 // StringMatrix matrix = new StringMatrix();
25 // String sub = "DataRow";
26 // ModelUtil.xmlToStringMatrix(matrix, root, sub);
27 // System.out.println(matrix.toString());
30 XMLToModelConverter c = new XMLToModelConverter(root);
31 String name = ModelUtil.getTableName(root);
32 System.out.print("Table-name: ");
33 System.out.println(name);
34 Column[] cols = c.getColumns();
35 for (int i = 0; i < cols.length; i++) {
36 System.out.print("Column-name: " + i + " ");
37 System.out.println(cols[i].getName());
40 } catch (Exception e) {