See also:use warnings; use strict; use XML::Simple; my $str = ' <servers> <station18> <ip>10.0.0.101</ip> <ip>10.0.1.101</ip> <ip>10.0.0.102</ip> <ip>10.0.0.103</ip> <ip>10.0.1.103</ip> </station18> <station19> <ip>10.0.0.111</ip> <ip>10.0.1.111</ip> <ip>10.0.0.112</ip> <ip>10.0.0.113</ip> <ip>10.0.1.113</ip> </station19> <station17> <ip>10.0.0.121</ip> <ip>10.0.1.121</ip> <ip>10.0.0.122</ip> <ip>10.0.0.123</ip> <ip>10.0.1.123</ip> </station17> </servers> '; my $xml = XMLin($str); print "$_\n" for @{ $xml->{station17}{ip} }; __END__ 10.0.0.121 10.0.1.121 10.0.0.122 10.0.0.123 10.0.1.123
In reply to Re: Is there any XML reader like this?
by toolic
in thread Is there any XML reader like this?
by ashok.g
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |