Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 96886 invoked from network); 23 Mar 2011 19:10:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Mar 2011 19:10:29 -0000 Received: (qmail 79018 invoked by uid 500); 23 Mar 2011 17:24:05 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 78943 invoked by uid 500); 23 Mar 2011 17:24:05 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 78935 invoked by uid 99); 23 Mar 2011 17:24:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 17:24:05 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rtparies@gmail.com designates 209.85.161.43 as permitted sender) Received: from [209.85.161.43] (HELO mail-fx0-f43.google.com) (209.85.161.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 17:23:58 +0000 Received: by fxm3 with SMTP id 3so8049070fxm.30 for ; Wed, 23 Mar 2011 10:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=SuKSIEHx6iYuHI79ad1lRyqdTrtyxjUH4lg1DobJm6s=; b=rHfHUv+FHig0wXOmwDt03JdEkyzCFfacz3ASmY4NBPM2IDi3W4LDIYDgn+OdTEtYWt ozdUl0KF+JyEE4f7sYdq8rSbZhjAabl2B3rsxEOqpKVzV+Hlcg2YJdP8bFiTUjLosTkS ZrorXiD4Qb0jSmQcLVIOcNUNag4oHJrZHQsPQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=IjS/9y8ZLRoDMckSQHEzpaA+V6mkaHiYs4hPMiP7EAH+R/esSvFMECKVzZnrqhKLWC mQMVXU+QlWFaBZzDZplpuHmzx1PlPjRAvIEsO7cFi4viFw5KXrT1o8ib0kNfwScFWvKZ uRAmr8Bgpqz909oxyyVL3s1bNEBW+jtC45QnA= MIME-Version: 1.0 Received: by 10.223.86.200 with SMTP id t8mr6419914fal.26.1300900954944; Wed, 23 Mar 2011 10:22:34 -0700 (PDT) Received: by 10.223.145.131 with HTTP; Wed, 23 Mar 2011 10:22:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Mar 2011 12:22:34 -0500 Message-ID: Subject: Re: [Digester] getting java.net.MalformedURLException: no protocol: From: Randy Paries To: Konstantin Kolinko Cc: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 On Wed, Mar 23, 2011 at 12:11 PM, Konstantin Kolinko wrote: > 2011/3/23 Randy Paries : >> Hello, >> I have a stringBuilder Object that has the xml below:: >> when i try to do >> Appointments a = (Appointments)digester.parse( sBuf.toString() ); >> i get the exception :: >> java.net.MalformedURLException: no protocol: >> >> Can someone give me a little insight what i may be doing wrong > > Digester version = ? > > JavaDoc: > http://commons.apache.org/digester/commons-digester-2.1/docs/api/org/apache/commons/digester/Digester.html#parse%28java.lang.String%29 > > The URI argument of Digester.parse(String) is the URI, i.e. > "identifier", address of a document that you are trying to parse. > > If you have the document already as a String in memory, use > Digester.parse(Reader) with a StringReader. > > >> >> Thanks >> >> >> >> (...) >> >> > > Best regards, > Konstantin Kolinko > Konstantin, thanks for responding i am using commons-digester-2.1 So i am now doing::: Digester digester = new Digester(); digester.setValidating( false ); digester.addObjectCreate( "appointments", Appointments.class ); digester.addBeanPropertySetter( "appointments/p1", "p1" ); digester.addBeanPropertySetter( "appointments/p2", "p2" ); digester.addObjectCreate( "appointments/appointment", Appointment.class ); digester.addBeanPropertySetter( "appointments/appointment/memberID", "memberID" ); digester.addBeanPropertySetter( "appointments/appointment/email", "email" ); digester.addBeanPropertySetter( "appointments/appointment/cellPhone", "cellPhone" ); digester.addBeanPropertySetter( "appointments/appointment/startDate", "startDate" ); digester.addBeanPropertySetter( "appointments/appointment/startTime", "startTime" ); digester.addBeanPropertySetter( "appointments/appointment/empID", "empID" ); digester.addBeanPropertySetter( "appointments/appointment/appointmentType", "appointmentType" ); digester.addSetNext( "appointments/appointment", "addAppointment" ); StringReader srreader = new StringReader(sBuf.toString()); Appointments a = (Appointments)digester.parse( srreader ); but a is always null. No exception. does this mean my mapping is not set up correctly? Thanks again --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org