jstrachan 2003/01/14 10:40:19
Modified: jelly/src/java/org/apache/commons/jelly/parser
XMLParser.java
Log:
added a getter method so that the XMLParser can be used directly with any SAX parser
by just invoking the SAX callbacks directly
Revision Changes Path
1.43 +18 -6
jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java
Index: XMLParser.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- XMLParser.java 8 Jan 2003 19:17:27 -0000 1.42
+++ XMLParser.java 14 Jan 2003 18:40:19 -0000 1.43
@@ -577,6 +577,19 @@
this.validating = validating;
}
+
+ /**
+ * Returns the script that has just been created if this class is used
+ * as a SAX ContentHandler and passed into some XML processor or parser.
+ *
+ * @return the ScriptBlock created if SAX events are piped into this class,
+ * which must include a startDocument() and endDocument()
+ */
+ public ScriptBlock getScript() {
+ return script;
+ }
+
+
// ContentHandler interface
//-------------------------------------------------------------------------
/**
@@ -1246,5 +1259,4 @@
protected SAXException createSAXException(String message) {
return createSAXException(message, null);
}
-
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>