Class pmr.sgml.SGMLStream
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.sgml.SGMLStream
java.lang.Object
|
+----pmr.sgml.SGMLStream
- public class SGMLStream
- extends Object
reads SGML stream and bundles it into a Vector of tags and content
Warning - the bit below may not be implemented; I am moving towards
supporting XML (the W3 approach);
- Author:
- (C) P. Murray-Rust, 1996
-
SGMLStream()
-
-
SGMLStream(String)
- make SGMLStream from a file(name)
-
SGMLStream(String, String)
- used when the input is a fragment without a DOCTYPE statement
-
SGMLStream(StringList)
- the best way to create it from an unknown input type (e.g.
-
SGMLStream(StringList, String)
- the preferred constructor
-
getDTDName()
-
-
getStreamVector()
- this is where the parsed stream is obtained.
-
substituteEntities(String)
- resolve entities in a string.
-
toString()
-
-
unSubstituteEntities(String)
- unresolve entities in a string.
SGMLStream
public SGMLStream()
SGMLStream
public SGMLStream(String filename) throws BadSGMLFileException
- make SGMLStream from a file(name)
- Throws: BadSGMLFileException
- file is not an SGML file (or doesn't exist)
SGMLStream
public SGMLStream(String filename,
String dtdName) throws BadSGMLFileException
- used when the input is a fragment without a DOCTYPE statement
- Throws: BadSGMLFileException
- file is not an SGML file (or doesn't exist)
SGMLStream
public SGMLStream(StringList lines) throws BadSGMLFileException
- the best way to create it from an unknown input type (e.g.
file or URL
- Throws: BadSGMLFileException
- input did not exist or was not SGML
SGMLStream
public SGMLStream(StringList lines,
String dtdName) throws BadSGMLFileException
- the preferred constructor
- Throws: BadSGMLFileException
- input did not exist or was not SGML
getStreamVector
public Vector getStreamVector()
- this is where the parsed stream is obtained. The contents consist of
nested
_STARTTAG gi attributeList
_PEL stringContent
_ENDTAG gi
where _PEL indicates #PCDATA
substituteEntities
public static String substituteEntities(String s)
- resolve entities in a string. take these from EntitySet which includes
< and > since they affect the SGML parsing
unSubstituteEntities
public static String unSubstituteEntities(String s)
- unresolve entities in a string. At present the only entities are > and <
since they affect the SGML parsing
getDTDName
public String getDTDName()
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index