commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus Sirviö <magnus.sir...@denzir.com>
Subject Re: [digester] NodeCreateRule problem with jdk1.5.0
Date Fri, 20 May 2005 14:15:01 GMT
No I'm not using any endorsed libraries.

José Antonio Pérez Testa wrote:

>Do you have endorsed libraries in some of the jdk?
>
>Magnus Sirviö wrote:
>
>  
>
>>Hi,
>>
>>I have problems using NodeCreatRule to extract some xml when using
>>jdk1.5.0_02. When I use jdk1.4.2_08 it works as expected. Any hints?
>>
>>Windows XP, commons-digester-1.6, commons-beanutils-1.7.0,
>>commons-logging-1.0.4
>>
>>This is my simple test:
>>
>>import org.apache.commons.digester.Digester;
>>import org.apache.commons.digester.NodeCreateRule;
>>import java.io.StringReader;
>>
>>public class NodeCreateRuleTest
>>{
>>  private final static String TEST_XML =
>>      "<?xml version='1.0'?><root>ROOT BODY<alpha>ALPHA BODY</alpha>"
+
>>      "<beta>BETA BODY</beta><gamma>GAMMA BODY</gamma></root>";
>>
>>  public static void main(String[] args)
>>  {
>>    try
>>    {
>>      Digester digester = new Digester();
>>      digester.setValidating(false);
>>      digester.addRule("root/alpha", new NodeCreateRule());
>>      Object result = digester.parse(new StringReader(TEST_XML));
>>      System.out.println(result);
>>    }
>>    catch(Exception e)
>>    {
>>      System.err.println(e.getMessage());
>>    }
>>  }
>>}
>>
>>Output with jdk1.4.2_08:
>><alpha>ALPHA BODY</alpha>
>>
>>Output with jdk1.5.0_02:
>>[alpha: null]
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>--
>
>José Antonio Pérez Testa
>Ingeniería de Servicios e Innovación técnologica.
>
>Telémaco 3
>28027 - Madrid (ESPAÑA)
>Tel: +34-91-480.81.12
>
>japtesta@indra.es
>www.indra.es
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message