Revision 98
Added by Matt Jones over 24 years ago
DBSAXHandler.java | ||
---|---|---|
34 | 34 |
|
35 | 35 |
static int elementNo = 0; |
36 | 36 |
static String docname; |
37 |
private DBSAXDocument currentDocument; |
|
37 | 38 |
private String doctype; |
38 | 39 |
private String systemid; |
40 |
private long rootnodeid = 0; |
|
39 | 41 |
private boolean debug = false; |
40 | 42 |
private boolean stackCreated = false; |
41 | 43 |
private Stack elementStack; |
... | ... | |
67 | 69 |
/** SAX Handler that receives notification of end of the document */ |
68 | 70 |
public void endDocument() throws SAXException |
69 | 71 |
{ |
72 |
currentDocument.setTitleFromChildElement(); |
|
73 |
System.out.println(currentDocument.getTitle()); |
|
70 | 74 |
System.out.println("end Document"); |
71 | 75 |
} |
72 | 76 |
|
... | ... | |
136 | 140 |
// go to create document definition in the db |
137 | 141 |
// call once after insertion of the first element |
138 | 142 |
if (parent_id == 0) { |
139 |
long rootnodeid = currentElement.getElementID();
|
|
140 |
new DBSAXDocument(conn, rootnodeid, docname, doctype); |
|
143 |
this.rootnodeid = currentElement.getElementID();
|
|
144 |
currentDocument = new DBSAXDocument(conn, rootnodeid, docname, doctype);
|
|
141 | 145 |
} |
142 | 146 |
|
143 | 147 |
// Add all of the attributes |
Also available in: Unified diff
improved query result handling