public final class SDocumentParser extends Object
A document parser that uses XOM to process documents.
Note: This is not a public API and is subject to change without warning.
| Modifier and Type | Method and Description |
|---|---|
static SDocument |
fromStream(InputStream stream,
URI uri,
com.io7m.jlog.LogUsableType log)
Parse a document from a validated stream.
|
static SImage |
image(nu.xom.Element ec)
Parse an image element.
|
static SLink |
link(nu.xom.Element ec)
Parse a link element.
|
static SLinkExternal |
linkExternal(nu.xom.Element ec)
Parse an external link.
|
static SParagraph |
paragraph(com.io7m.jlog.LogUsableType log,
nu.xom.Element e)
Parse a paragraph element.
|
static STerm |
term(nu.xom.Element ec)
Parse a term element.
|
static SVerbatim |
verbatim(nu.xom.Element ec)
Parse a verbatim element.
|
public static SDocument fromStream(InputStream stream, URI uri, com.io7m.jlog.LogUsableType log) throws nu.xom.ValidityException, SAXException, ParserConfigurationException, nu.xom.ParsingException, IOException, URISyntaxException, nu.xom.xinclude.BadParseAttributeException, nu.xom.xinclude.InclusionLoopException, nu.xom.xinclude.NoIncludeLocationException, nu.xom.xinclude.XIncludeException
uri - The base URI of the documentstream - The streamlog - A log handleSAXException - On XML parse errorsParserConfigurationException - On parser configuration errorsnu.xom.ValidityException - On XML validation errorsnu.xom.ParsingException - On parser errorsIOException - On I/O errorsURISyntaxException - On failing to parse a URInu.xom.xinclude.XIncludeException - If an xinclude failsnu.xom.xinclude.NoIncludeLocationException - If an xinclude failsnu.xom.xinclude.InclusionLoopException - If an xinclude failsnu.xom.xinclude.BadParseAttributeException - If an xinclude failspublic static SImage image(nu.xom.Element ec) throws URISyntaxException
ec - The raw elementURISyntaxException - On malformed URIspublic static SLink link(nu.xom.Element ec) throws URISyntaxException
ec - The raw elementURISyntaxException - On malformed URIspublic static SLinkExternal linkExternal(nu.xom.Element ec) throws URISyntaxException
ec - The raw elementURISyntaxException - On malformed URIspublic static SParagraph paragraph(com.io7m.jlog.LogUsableType log, nu.xom.Element e) throws URISyntaxException
log - A log handlee - The raw elementURISyntaxException - On malformed URIspublic static STerm term(nu.xom.Element ec)
ec - The raw elementpublic static SVerbatim verbatim(nu.xom.Element ec)
ec - The raw elementCopyright © 2015 <code@io7m.com> http://io7m.com