You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Wm.A.Stafford" <st...@marine.rutgers.edu> on 2008/12/11 16:17:00 UTC
DIGESTER - some sample code
Here is some sample code from my Digester app:
java.net.URL GCMD_URL = new
java.net.URL("http://gcmd.gsfc.nasa.gov/OpenAPI/getdif.py?format=xml&entry_id=eurobis_66");
Digester digester = new Digester() ;
digester.setValidating ( false );
digester.addObjectCreate( "DIFF", String.class) ; // DIFF is
the outermost tag
String s = (String)digester.parse(GCMD_URL) ;
s.toString();
// s is null here
Any ideas?
-=bill
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: DIGESTER - some sample code
Posted by James Carman <ja...@carmanconsulting.com>.
Works for me if you change "DIFF" to "DIF". Although, it doesn't
print anything.
On Thu, Dec 11, 2008 at 10:17 AM, Wm.A.Stafford
<st...@marine.rutgers.edu> wrote:
> Here is some sample code from my Digester app:
>
> java.net.URL GCMD_URL = new
> java.net.URL("http://gcmd.gsfc.nasa.gov/OpenAPI/getdif.py?format=xml&entry_id=eurobis_66");
> Digester digester = new Digester() ;
> digester.setValidating ( false );
> digester.addObjectCreate( "DIFF", String.class) ; //
> DIFF is the outermost tag
> String s = (String)digester.parse(GCMD_URL) ;
> s.toString();
> // s is null here
>
> Any ideas?
>
> -=bill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: DIGESTER - some sample code
Posted by James Carman <ja...@carmanconsulting.com>.
No, "DIF" is the outermost tag.
On Thu, Dec 11, 2008 at 10:17 AM, Wm.A.Stafford
<st...@marine.rutgers.edu> wrote:
> Here is some sample code from my Digester app:
>
> java.net.URL GCMD_URL = new
> java.net.URL("http://gcmd.gsfc.nasa.gov/OpenAPI/getdif.py?format=xml&entry_id=eurobis_66");
> Digester digester = new Digester() ;
> digester.setValidating ( false );
> digester.addObjectCreate( "DIFF", String.class) ; //
> DIFF is the outermost tag
> String s = (String)digester.parse(GCMD_URL) ;
> s.toString();
> // s is null here
>
> Any ideas?
>
> -=bill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org