1 package net.sourceforge.phpeclipse.wizards.actions.metadata;
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.IMetadataExtension;
9 import com.quantum.model.Column;
10 import com.quantum.model.xml.XMLToModelConverter;
12 public class PHPMetadataWizard implements IMetadataExtension {
17 * @see com.quantum.extensions.IDataExtension#run(org.w3c.dom.Document)
19 public void run(Document doc) {
20 // System.out.println(doc);
22 Element root = doc.getDocumentElement();
25 XMLToModelConverter c = new XMLToModelConverter(root);
26 String name = ModelUtil.getTableName(root);
27 System.out.print("Table-name: ");
28 System.out.println(name);
29 Column[] cols = c.getColumns();
30 for (int i = 0; i < cols.length; i++) {
31 System.out.print("Column-name: "+i+" ");
32 System.out.println(cols[i].getName());
35 } catch (Exception e) {