2003/12/25 08:09:21
[org.ibex.core.git] / src / org / xwt / XWT.java
index fe306af..43178da 100644 (file)
@@ -243,18 +243,18 @@ public final class XWT extends JS {
     private class XMLHelper extends XML {
         Vector obStack = new Vector();
         public XMLHelper() { super(BUFFER_SIZE); }
-        public void startElement(XML.Element c) throws XML.SchemaException {
+        public void startElement(XML.Element c) throws XML.Exn {
             try {
                 JS o = new JS();
-                o.put("$name", c.localName);
-                for(int i=0; i<c.len; i++) o.put(c.keys[i], c.vals[i]);
+                o.put("$name", c.getLocalName());
+                for(int i=0; i < c.getAttrLen(); i++) o.put(c.getAttrKey(i), c.getAttrVal(i));
                 o.put("$numchildren", new Integer(0));
                 obStack.addElement(o);
             } catch (JSExn jse) {
                 throw new Error("this should never happen");
             }
         }
-        public void endElement(XML.Element c) throws XML.SchemaException {
+        public void endElement(XML.Element c) throws XML.Exn {
             try {
                 if (obStack.size() == 1) return;
                 JS me = (JS)obStack.lastElement();
@@ -267,7 +267,7 @@ public final class XWT extends JS {
                 throw new Error("this should never happen");
             }
         }
-        public void characters(char[] ch, int start, int length) throws XML.SchemaException {
+        public void characters(char[] ch, int start, int length) throws XML.Exn {
             try {
                 String s = new String(ch, start, length);
                 JS parent = (JS)obStack.lastElement();
@@ -288,7 +288,7 @@ public final class XWT extends JS {
             try { 
                 BufferedReader r = new BufferedReader(new InputStreamReader(is));
                 parse(r);
-            } catch (XML.XMLException e) {
+            } catch (XML.Exn e) {
                 throw new JSExn("error parsing XML: " + e.toString());
             } catch (IOException e) {
                 if (Log.on) Log.log(this, "IO Exception while reading from file");