pipe.c

来自「HTML-XML-utils由一套小型C程序(过滤器)组成」· C语言 代码 · 共 66 行

C
66
字号
/* * pipe - output HTML/XML in canonical ("sgmls" form * * Parse HTML/XML and output in approximate "nsgmls" format. Some of * the differences are that comments are also printed (see * below), * that implied attributes are not, and that entities are left * unexpanded. Use "unent" to expand entities to UTF-8. * * The program doesn't interpret the source in any way, and doesn't * read DTDs. That means that, e.g., end tags are not automatically * added. Pipe the source through normalize(1) first in order to * convert HTML to XML and infer missing tags. * * The possible command characters and arguments are as follows: * *     (gi * *	    The start of an element whose generic identifier is gi. *	    Any attributes for this element will have been speci- fied *	    with A commands. * *     )gi * *	    The end of an element whose generic identifier is gi. * *     |gi * *	    An empty element (an element whose tag in the source ended *	    with a slash). Any attributes will have been specified *	    with A commands. (Note that this distinguishes empty *	    elements from elements that happen to have no content, *	    even though XML doesn't.) * *     -data * *	    Data. * *     ?pi * *	    A processing instruction with data pi. * *     *comment * *	    A comment * *     Aname type val * *	    The next element to start has an attribute name with value *	    val and type type. Implied attribute are not shown. All *	    attributes are assumed to be of type CDATA, since pipe *	    doesn't read DTDs. * *     !root "fpi" url *     !root "fpi" *     !root "" url * *	    A document type declaration. The fpi (public identifier) *	    is a quoted string. If there is no fpi, the string is *	    empty: "". If there is no url, itis omitted. * *     Llineno * *	    Set the current line number. This will be output only if *	    the -l option has been given. * * Copyright 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?