You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/12/31 12:11:35 UTC

cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml ParseTag.java ParseTagSupport.java

jstrachan    2002/12/31 03:11:35

  Modified:    jelly/src/java/org/apache/commons/jelly/tags/xml
                        ParseTag.java ParseTagSupport.java
  Log:
  Provided support for File objects in the parse tags. So you can now call <x:parse xml="${someFile}"/>
  
  Revision  Changes    Path
  1.14      +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTag.java
  
  Index: ParseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTag.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ParseTag.java	30 Oct 2002 19:16:23 -0000	1.13
  +++ ParseTag.java	31 Dec 2002 11:11:34 -0000	1.14
  @@ -108,7 +108,7 @@
           return this.xml;
       }
   
  -    /** Sets the source of the XML which is either a String URI, Reader or InputStream */
  +    /** Sets the source of the XML which is either a String URI, a File, Reader or InputStream */
       public void setXml(Object xml) {
           this.xml = xml;
       }
  
  
  
  1.5       +4 -0      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTagSupport.java
  
  Index: ParseTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTagSupport.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParseTagSupport.java	19 Dec 2002 14:46:00 -0000	1.4
  +++ ParseTagSupport.java	31 Dec 2002 11:11:34 -0000	1.5
  @@ -61,6 +61,7 @@
    */
   package org.apache.commons.jelly.tags.xml;
   
  +import java.io.File;
   import java.io.InputStream;
   import java.io.Reader;
   import java.net.URL;
  @@ -169,6 +170,9 @@
           
           if (source instanceof URL) {
               return getSAXReader().read((URL) source);
  +        }
  +        else if (source instanceof File) {
  +            return getSAXReader().read((File) source);
           }
           else if (source instanceof Reader) {
               return getSAXReader().read((Reader) source);
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml ParseTag.java ParseTagSupport.java

Posted by di...@multitask.com.au.
This is lots better....
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


jstrachan@apache.org wrote on 31/12/2002 10:11:35 PM:

> jstrachan    2002/12/31 03:11:35
> 
>   Modified:    jelly/src/java/org/apache/commons/jelly/tags/xml
>                         ParseTag.java ParseTagSupport.java
>   Log:
>   Provided support for File objects in the parse tags. So you can 
> now call <x:parse xml="${someFile}"/>
> 
>   Revision  Changes    Path
>   1.14      +6 -6      jakarta-commons-
> sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTag.java
> 
>   Index: ParseTag.java
>   ===================================================================
>   RCS file: /home/cvs/jakarta-commons-
> sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTag.java,v
>   retrieving revision 1.13
>   retrieving revision 1.14
>   diff -u -r1.13 -r1.14
>   --- ParseTag.java   30 Oct 2002 19:16:23 -0000   1.13
>   +++ ParseTag.java   31 Dec 2002 11:11:34 -0000   1.14
>   @@ -108,7 +108,7 @@
>            return this.xml;
>        }
> 
>   -    /** Sets the source of the XML which is either a String URI, 
> Reader or InputStream */
>   +    /** Sets the source of the XML which is either a String URI, 
> a File, Reader or InputStream */
>        public void setXml(Object xml) {
>            this.xml = xml;
>        }
> 
> 
> 
>   1.5       +4 -0      jakarta-commons-
> 
sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTagSupport.java
> 
>   Index: ParseTagSupport.java
>   ===================================================================
>   RCS file: /home/cvs/jakarta-commons-
> 
sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTagSupport.
> java,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- ParseTagSupport.java   19 Dec 2002 14:46:00 -0000   1.4
>   +++ ParseTagSupport.java   31 Dec 2002 11:11:34 -0000   1.5
>   @@ -61,6 +61,7 @@
>     */
>    package org.apache.commons.jelly.tags.xml;
> 
>   +import java.io.File;
>    import java.io.InputStream;
>    import java.io.Reader;
>    import java.net.URL;
>   @@ -169,6 +170,9 @@
> 
>            if (source instanceof URL) {
>                return getSAXReader().read((URL) source);
>   +        }
>   +        else if (source instanceof File) {
>   +            return getSAXReader().read((File) source);
>            }
>            else if (source instanceof Reader) {
>                return getSAXReader().read((Reader) source);
> 
> 
> 
> 
> --
> To unsubscribe, e-mail: 
<ma...@jakarta.apache.org>
> For additional commands, e-mail: 
<ma...@jakarta.apache.org>
> 

> ForwardSourceID:NT0009D78E 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>