Author Login
Post Reply
Hey everyone can someone help me make this Groovy? I wouldn't mind someone
showing me how to create an XML slurper with BufferedReader
static String getRecord(Number)
{
String requestString =
"http://url/fs-xwc?query=srw.no+%3D+%22${Number}%22
&recordSchema=info:srw/schema/1/CDFXMLWORK"
URL url = new URL(requestString)
HttpURLConnection conn = (HttpURLConnection)url.openConnection()
conn.setRequestMethod("GET");
conn.setRequestProperty( "Content-type", "text/xml" );
BufferedReader bfr = new BufferedReader(new
InputStreamReader(conn.getInputStream()))
String inputLine
Boolean foundCDFLine = false
while ( (inputLine = bfr.readLine()) != null)
{
//if (inputLine.contains("<CDFRec xmlns="">"))
//System.out.println(inputLine)
}
}
--
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email