shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] usando expressoes regulares e XML


From: Tiago Barcellos Peczenyj
Subject: Re: [shell-script] usando expressoes regulares e XML
Date: Wed, 17 Jan 2007 12:04:46 -0200

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 <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]