Ola

vc pode usar o sed

$ cat XML
<teste1>
<teste2>
<teste3>
x
</teste3>
</teste2>
</teste1>

$ cat XML | sed  -n '/<teste2>/,/<\/teste2>/p'
<teste2>
<teste3>
x
</teste3>
</teste2>

Entretanto, se vc tiver algo como:

<teste1><teste2><teste3>x</teste3></teste2></teste1>

Vc vai ter q utilizar alguma ferramenta que manipule xml e xpath tipo xmllint

[]´s
On 1/17/07, Macgyver <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> Pessoal gostaria de um exemplo de como capturar
>  tudo que estiver entre dois tags XML via
>  expressao regular em bash, ja tentei algumas
>  formas mas ainda nao obtive exito total,
>  se alguem puder ajudar indicando um manual com
>  esta manipulaçao, qdo vou ao google os temas
>  estao em moda XML e bash caraca, vem algumas
>  milhares de materias ao ler umas 100 desisto rsrssr
>
>  abraços
>
>                    



-- 
Tiago B Peczenyj
Linux User #405772

# cd /pub
# more beer

Responder a