sgml.pl
is a Perl library that parses an SGML document instance.
require "sgml.pl";
Currently, sgml.pl
is not very suffisticated. It cannot handle complex SGML
documents.
&'SGMLread_sgml(
FILEHANDLE, *array_r);
SGMLread_sgml
reads SGML markup. The *array_r
is the returned array that
contains tags separated from text. I.e. SGMLread_sgml
splits the markup tags
from text. Each array item is either a markup tag or a text. The order of tag/text
items are the order they appear in the SGML document.
After SGMLread_sgml
is called, one only needs to `shift' thru the items to read the
SGML. If the item begins with a `<
` it is a tag, else it is text.
<!-- -->
', are deleted.
SGMLread_sgml
is not intended to parse a DTD, or an SGML delcaration
statement, `<SGML
...>
'. It is designed to parse SGML instances.
<
` or `>
'
characters.
<
` or `>
' characters will screw things up