Package org.postgresql.pljava.internal
Class SyntheticXMLReader.EventCarrier
java.lang.Object
org.postgresql.pljava.internal.SyntheticXMLReader.EventCarrier
- Enclosing class:
SyntheticXMLReader
Base class for a closure carrying one or more SAX events.
Only toSAX()
needs to be provided by an implementing class.
It can use content()
, dtd()
, entity()
, err()
,
decl()
, and lex()
to obtain the various SAX handlers onto
which it should disgorge events. Those methods never return null; a no-op
handler will be returned if the consumer code did not register a handler
of the corresponding type.
Additional convenience methods are provided for generating the most common SAX parse events.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected SyntheticXMLReader.FluentAttributes2
attrs()
Return the per-instance, reusableFluentAttributes2
instance, without clearing it first, so the attributes from its last use can be reused or modified.protected void
Write aString
value as aCDATA
segment.protected void
characters
(String s) Write aString
value as character content.protected SyntheticXMLReader.FluentAttributes2
cleared()
Return the per-instance, reusableFluentAttributes2
instance, clearing it first.protected ContentHandler
content()
protected DeclHandler
decl()
protected DTDHandler
dtd()
protected void
endElement
(String localName) End an element with only a local name.protected EntityResolver2
entity()
protected ErrorHandler
err()
protected LexicalHandler
lex()
protected void
startElement
(String localName) Start an element with only a local name and no attributes.protected void
startElement
(String localName, Attributes atts) Start an element with only a local name, and attributes.abstract void
toSAX()
-
Constructor Details
-
EventCarrier
public EventCarrier()
-
-
Method Details
-
content
-
dtd
-
entity
-
err
-
decl
-
lex
-
attrs
Return the per-instance, reusableFluentAttributes2
instance, without clearing it first, so the attributes from its last use can be reused or modified. -
cleared
Return the per-instance, reusableFluentAttributes2
instance, clearing it first. -
characters
Write aString
value as character content.- Throws:
SAXException
-
cdataCharacters
Write aString
value as aCDATA
segment.- Throws:
SAXException
-
startElement
Start an element with only a local name and no attributes.- Throws:
SAXException
-
startElement
Start an element with only a local name, and attributes.- Throws:
SAXException
-
endElement
End an element with only a local name.- Throws:
SAXException
-
toSAX
- Throws:
IOException
SAXException
SQLException
-