Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Now at any given time, the user of the CGI script needs to see the data in only one of the languages, which he selects (say from a form). Within the code, I have a variable that stores the language, i.e.<FILE> <FOO xml:lang="en"> <BAR/> </FOO> <FOO xml:lang="ru"> <BAR/> </FOO>
When I parse the XML (I'm using XML::Parser), I need only the blocks that are in the language (i.e. have the xml:lang attribute) specified by $lang. How do I do that?my $lang = "en";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing xml:lang attribute
by bart (Canon) on Jul 25, 2010 at 23:00 UTC | |
|
Re: Parsing xml:lang attribute
by happy.barney (Friar) on Jul 26, 2010 at 07:16 UTC | |
|
Re: Parsing xml:lang attribute
by intel (Beadle) on Jul 25, 2010 at 22:56 UTC |