Re: "sed libraries"

Mark Edgar <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <CABHMh_1AwUAJZ1x__DfPMx7E1ePRQi8QK__+XWaexto3Cm2OZA@mail.gmail.com>
On Thu, Jan 31, 2013 at 12:55 PM, Thierry Blanc <[email protected]> wrote:
> Let's create a sed library with such scripts (if it does not exist
> already ...)

There is the PYX format, supported by http://xmlstar.sf.net/ for XML
languages. I'm not sure whether that meets your needs, but I've used
it before in combination with tidy (to convert HTML to XHTML):

# Change TITLE to "New Title"
tidy -asxml <input.html 2>/dev/null | xmlstarlet pyx | sed
'1,/(title/b;/)title/,$b;s/.*/-New Title/' | xmlstarlet p2x
>output.xhtml

     -Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.