| java.lang.Object org.apache.cocoon.slop.parsing.SimpleSlopParser
SimpleSlopParser | public class SimpleSlopParser implements SlopParser,SlopConstants(Code) | | Simplistic SLOP parser, recognizes the following constructs:
Field: a line starting with letters and : is considered a field
Empty lines are detected.
Other lines are output as line elements
This is sufficient for basic parsing of RFC 822 headers,
but a configurable rfc822 mode would be good to differentiate
between the header and body of the email message and parse them
with different rules.
author: Bertrand Delacretaz version: $Id: SimpleSlopParser.java 433543 2006-08-22 06:22:54Z crossley $ |
Inner Class :static class ParsedLine | |
TAGNAME_REPLACEMENT_CHAR | final static String TAGNAME_REPLACEMENT_CHAR(Code) | | |
VALID_TAGNAME_CHARS | final static String VALID_TAGNAME_CHARS(Code) | | valid characters in an XML element name (in addition to letters and digits)
|
filterElementName | static String filterElementName(String str)(Code) | | make sure element names are valid XML
|
parseLine | protected ParsedLine parseLine(String line)(Code) | | parse a line, extract element name and contents
|
setPreserveWhitespace | public void setPreserveWhitespace(boolean b)(Code) | | optionally preserve whitespace in input
|
setValidTagnameChars | public void setValidTagnameChars(String str)(Code) | | set the list of valid chars for tag names (in addition to letters)
|
|
|