users
[Top] [All Lists]

Re: [cinjug-users] capture xml

To: "Jason Kretzer/STAR BASE Consulting Inc." <JKretzer@xxxxxxxxxxxxxxx>
Subject: Re: [cinjug-users] capture xml
From: Eric Galluzzo <egalluzzo@xxxxxxxxxxxxxxx>
Date: Tue, 20 Apr 2004 15:22:16 -0400
Cc: users@xxxxxxxxxx
Delivered-to: mailing list users@cinjug.org
In-reply-to: <OF0F1E248B.577296D8-ON85256E7C.0065ACE5-85256E7C.0065CA25@starbaseinc.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
References: <OF0F1E248B.577296D8-ON85256E7C.0065ACE5-85256E7C.0065CA25@starbaseinc.com>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Jason Kretzer/STAR BASE Consulting Inc. wrote:


Hello all,

I would like to be able to do the following. Have a class that can go to a URL

https://someWebSite.com/giveXML.jsp?someparam=paramOne

and capture the xml that is sent. Where does one begin in accomplishing this?

Something like this would work:

URL url = new URL( "https://someWebSite.com/giveXML.jsp?someparam=paramOne"; );
InputStream stream = url.openStream();
try
{
// read stream here, e.g. by passing into a SAX parser via an InputSource, or copying into a ByteArrayOutputStream
}
finally
{
stream.close();
}


   - Eric



<Prev in Thread] Current Thread [Next in Thread>