Olá Galera,<br><br>Estou precisando de uma ajudinha. Eu tenho um padrão de desenvolvimento já usado aqui simples para coletar informações do XML usando XML Twig. Então preciso coletar essas informações nesse XML no link->
<a href="http://www.rumo.com.br/sistema/XMLProdutos.asp?IDLoja=6928&Texto=&IDProduto=&IDCategoria=&ExibeDescricao=1&origem=jacotei&est=&Mult">http://www.rumo.com.br/sistema/XMLProdutos.asp?IDLoja=6928&Texto=&IDProduto=&IDCategoria=&ExibeDescricao=1&origem=jacotei&est=&Mult
</a><br><br>Sendo que a string resultante dessa requisição é a <span style="font-weight: bold; color: rgb(255, 102, 102);">variavel $string</span>;<br>Estou usando XML::Twig da seguinte forma:<br><br> <span style="font-weight: bold;">
my $twig = XML::Twig->new(keep_encoding => "true");</span><br style="font-weight: bold;"><span style="font-weight: bold;"> $twig->parse("$string");</span><br style="font-weight: bold;"><span style="font-weight: bold;">
foreach my $product ($twig->root->children('produto')) {</span><br style="font-weight: bold;"><span style="font-weight: bold;"> my $sibling = $product->first_child();</span><br style="font-weight: bold;">
<span style="font-weight: bold;"> my %produto;</span><br style="font-weight: bold;"><span style="font-weight: bold;"> my @nodes;</span><br style="font-weight: bold;"><span style="font-weight: bold;"> do {
</span><br style="font-weight: bold;"><span style="font-weight: bold;"> $produto{$sibling->tag()} = $sibling->child_text();</span><br style="font-weight: bold;"><span style="font-weight: bold;"> } while($sibling = $sibling->next_sibling());
</span><br><br>Só que preciso pegar o valor da tag <span style="color: rgb(51, 51, 255);"><descritor nome="Peso líquido:"></span><span style="font-weight: bold; color: rgb(51, 51, 255);">VALOR</span><span style="color: rgb(51, 51, 255);">
</descritor></span>.<br>Reparando bem existe <span style="font-weight: bold;">outra tag descritor</span> onde o atributo nome tem valor <span style="font-weight: bold;">DIMENSÕES</span>. <br>Alguém pode me ajudar a pegar esse
<span style="font-weight: bold; color: rgb(51, 102, 255);">VALOR</span>?<br><br clear="all"><br>-- <br>Atenciosamente,<br><br>Roan Brasil Monteiro<br>Presidente do Rotaract Club Lauro de Freitas D4550<br>Gestão 2006/2007<br>
________________________________<br>*-*,*-*,*-*,*-*,*-*,*-*,*-*,*-*,*-*,*-*<br>Faculdade UNIME<br><a href="http://www.unime.com.br">www.unime.com.br</a><br>BSI - Bacharelado de Sistema de Informação<br>Roan Brasil Monteiro
<br>_____________________<br>*-*,*-*,*-*,*-*,*-*,*-*,*-*,*-*,*-*,*-*<br><br>"NA LUTA ENTRE BATMAN E PINGÜIM,<br>EU SOU MAIS O PINGÜIM..." by Roan<br>____<br> °v° NÃO USE DROGAS,<br>/(_)\ USE GNU/LINUX<br> ^ ^
<br>Por que ver o MUNDO através de 'janelas'<br>Se você pode usar portas.<br><br>"Software Livre:<br> Socialmente Justo,<br> Economicamente Viável,<br> Tecnologicamente Sustentável"