Hi Ramin,
I would really like to help you but apologize, it is really hard for
me reading that code embedded in email - could you please paste
somewhere such as pastebin/gist?

TIA,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



2012/3/10 Ramin Heidari <ramin.heid...@hotmail.com>:
>
> Hi,
> i want to pars an xml but I have a got a problem in defining rule for below 
> part of xml because there are two same <Name> tage with different attributes 
> .i set the rule but it seems that i won't work(alway the value set null).Do 
> you have any idea who i can fix it.
> XML........................        <Match MatchId="4616735">          
> <MatchDate>2011-01-05T07:30:00</MatchDate>          <Team1 TeamId="1029369">  
>           <Name language="en">Wellington Phoenix FC</Name>            <Name 
> language="se">Wellington</Name>          </Team1>          <Team2 
> TeamId="529088">&nb
>  sp;           <Name language="en">Melbourne Victory</Name>            <Name 
> language="se">Melbourne Victory</Name>          </Team2> 
> .........................
>
>        //A new Course instance        
> digester.addObjectCreate("LivescoreData/Sport/Category/Tournament/Match", 
> Match.class);
>        //A new Course instance        
> digester.addObjectCreate("LivescoreData/Sport/Category/Tournament/Match/Team1",
>  Team1.class);
>        
> digester.addSetProperties("LivescoreData/Sport/Category/Tournament/Match/Team1","TeamId","teamId");
>
>
>        
> digester.addBeanPropertySetter("livescoreData/sport/Category/Tournament/Match/Team1/Name","name");
>       // 
> digester.addCallMethod("livescoreData/sport/Category/Tournament/Match/Team1/Name",
>  "setName", 1 );
>
>        
> digester.addSetNext("LivescoreData/Sport/Category/Tournament/Match/Team1", 
> "addTeam1");
>        
> digester.addObjectCreate("LivescoreData/Sport/Category/Tournament/Match/Team2",
>  Team2.class);        
> digester.addBeanPropertySetter("livescoreData/sport/Category/Tournament/Match/Team2/Name","language_en");
>        
> digester.addSetNext("LivescoreData/Sport/Category/Tournament/Match/Team2", 
> "addTeam2");
>
> thanks,Ramin
>
>
>
>
>
>

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

Reply via email to