This file is indexed.

/usr/share/doc/sgmls-doc/SGMLSpm/sgmls.html is in sgmls-doc 1.03ii-36.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<HTML>
<HEAD>
<TITLE>How do I use SGMLS.pm?</TITLE>
</HEAD>
<BODY>

<P><B>Links</B>: <A HREF=sgmlsevent.html>Next</A> <A HREF=perl5.html>Previous</A> <A HREF=sgmlspm.html>Up</A> <A HREF=sgmlspm.html>Top</A></P>

<H1>How do I use <A HREF=sgmlspm.html><TT>SGMLS.pm</TT></A>?</H1>

<P>First, you need to copy the file <A HREF=sgmlspm.html><TT>SGMLS.pm</TT></A> to a directory where
perl can find it (on a Unix system, it might be
<TT>/usr/lib/perl5</TT> or
<TT>/usr/local/lib/perl5</TT>, or whatever the environment
variable <TT>PERL5LIB</TT> is set to) and make certain that it
is world-readable.</P>

<P>Next, near the top of your <A HREF="http://www.metronet.com/0/perlinfo/perl5/manual/perl.html"><TT>perl5</TT></A> program, type the following
line:</P>

<P>
<PRE>use SGMLS;</PRE>
</P>
<P>You must then open up a file handle from which <A HREF=sgmlspm.html><TT>SGMLS.pm</TT></A> can read the
data from an <TT>onsgmls</TT>, <TT>sgmls</TT> or <A HREF="http://www.jclark.com/sp.html"><TT>nsgmls</TT></A> process, unless you are reading from
a standard handle like <TT>STDIN</TT> -- for example,
if you are piping the output from <TT>sgmls</TT> to a <A HREF="http://www.metronet.com/0/perlinfo/perl5/manual/perl.html"><TT>perl5</TT></A> script, using
something like</P>

<P>
<PRE>sgmls foo.sgml | perl myscript.pl</PRE>
</P>
<P>then the predefined filehandle <TT>STDIN</TT> will be
sufficient.  In DOS, you might want to dump the sgmls output to a file
and use it as standard input (or open it explicitly in perl), and in
Unix, you might actually want to open a pipe or socket for the input.
<A HREF=sgmlspm.html><TT>SGMLS.pm</TT></A> doesn't need to seek, so any input stream should
work.</P>

<P>To parse the <TT>onsgmls</TT>, <TT>sgmls</TT> or <A HREF="http://www.jclark.com/sp.html"><TT>nsgmls</TT></A> output from the handle, create
a new object instance of the <TT>SGMLS</TT> class with
the handle as an argument, i.e.</P>

<P>
<PRE>$parse = new SGMLS(STDIN);</PRE>
</P>
<P>(You may create more than one <TT>SGMLS</TT>
object at once, but each object <EM>must</EM> have a
unique handle pointing to a unique stream, or
<EM>chaos</EM> will result.)  Now, you can retrieve and
process events using the <TT>next_event</TT> method:</P>

<P>
<PRE>while ($event = $parse->next_event) {
    #do something with each event
}</PRE>
</P>

<P><B>Links</B>: <A HREF=sgmlsevent.html>Next</A> <A HREF=perl5.html>Previous</A> <A HREF=sgmlspm.html>Up</A> <A HREF=sgmlspm.html>Top</A></P>


<ADDRESS>David Megginson <A HREF="mailto:dmeggins@aix1.uottawa.ca">&lt;dmeggins@aix1.uottawa.ca&gt;</A></ADDRESS>
</BODY>
</HTML>