|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.parser.xml.XMLContentHandler
Converts between XML messages and Content objects.
XML particular Content object implementation details:
Content
object attrbiutes are converted to XML TAG attributes
unless.
Content
object sub-nodes becomes inner-tag of parent
Content
is belongs to.
Content
can contain attributes "dtd-doctype" and "dtd-system"
which will be used to construct a DTD tag at the start of the document if they are specified
XMLDataBinding
Field Summary | |
static java.lang.String |
XML_ATTR_CLOSE
Deprecated. |
static java.lang.String |
XML_ATTR_OPEN
Deprecated. |
static java.lang.String |
XML_CDATA_CLOSE
Deprecated. |
static java.lang.String |
XML_CDATA_CLOSE_REPLACE
Deprecated. |
static java.lang.String |
XML_CDATA_START
Deprecated. |
static java.lang.String |
XML_DTD_END
Deprecated. |
static java.lang.String |
XML_DTD_MIDDLE
Deprecated. |
static java.lang.String |
XML_DTD_START
Deprecated. |
static java.lang.String |
XML_HEADER
Deprecated. The tag found at the start of every XML document |
static java.lang.String |
XML_SPACE
Deprecated. |
static java.lang.String |
XML_TAG_CLOSE
Deprecated. |
static java.lang.String |
XML_TAG_CLOSE_END
Deprecated. |
static java.lang.String |
XML_TAG_OPEN
Deprecated. |
static java.lang.String |
XML_TAG_OPEN_END
Deprecated. |
Constructor Summary | |
XMLContentHandler()
Deprecated. Default constructor for this Parser. |
Method Summary | |
boolean |
canParse(java.lang.String content)
Deprecated. Determines if the Parser implementation can parse the given content |
void |
characters(char[] ch,
int start,
int length)
Deprecated. Receive notification of character data inside an element. |
java.lang.String |
deparse(Content content)
Deprecated. This method converts a Content object into a document which is of a format determined by the Parser implementation. |
void |
endDocument()
Deprecated. Receive notification of the end of the document. |
void |
endElement(java.lang.String name)
Deprecated. Receive notification of the end of an element. |
void |
error(org.xml.sax.SAXParseException e)
Deprecated. Receive notification of a recoverable parser error. |
void |
fatalError(org.xml.sax.SAXParseException e)
Deprecated. Report a fatal XML parsing error. |
static java.lang.String |
getNormalisedForm(java.lang.String non_normalised)
Deprecated. If necessary converts the given String into a format suitable for placing within an XML tags (i.e. |
java.lang.String |
getParserType()
Deprecated. Returns the type of content language that the Parser implementation handles. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Deprecated. Receive notification of ignorable whitespace in element content. |
static boolean |
isXML(java.lang.String content)
Deprecated. Indicates if the given content is an XML document |
static void |
main(java.lang.String[] args)
Deprecated. |
void |
notationDecl(java.lang.String p1,
java.lang.String p2,
java.lang.String p3)
Deprecated. Receive notification of a notation declaration. |
Content |
parse(java.lang.String content)
Deprecated. This method converts a content String into a set of Content objects |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Deprecated. Receive notification of a processing instruction. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Deprecated. Resolve an external entity. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Deprecated. Receive a Locator object for document events. |
void |
startDocument()
Deprecated. Receive notification of the beginning of the document. |
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList attributes)
Deprecated. Receive notification of the start of an element. |
void |
unparsedEntityDecl(java.lang.String p1,
java.lang.String p2,
java.lang.String p3,
java.lang.String p4)
Deprecated. Receive notification of an unparsed entity declaration. |
void |
warning(org.xml.sax.SAXParseException e)
Deprecated. Receive notification of a parser warning. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_HEADER
public static final java.lang.String XML_TAG_OPEN
public static final java.lang.String XML_TAG_OPEN_END
public static final java.lang.String XML_TAG_CLOSE
public static final java.lang.String XML_TAG_CLOSE_END
public static final java.lang.String XML_ATTR_OPEN
public static final java.lang.String XML_ATTR_CLOSE
public static final java.lang.String XML_CDATA_START
public static final java.lang.String XML_CDATA_CLOSE
public static final java.lang.String XML_CDATA_CLOSE_REPLACE
public static final java.lang.String XML_DTD_START
public static final java.lang.String XML_DTD_MIDDLE
public static final java.lang.String XML_DTD_END
public static final java.lang.String XML_SPACE
Constructor Detail |
public XMLContentHandler()
Method Detail |
public java.lang.String deparse(Content content)
deparse
in interface Parser
content
- The Content object to deparsepublic Content parse(java.lang.String content)
parse
in interface Parser
content
- The String to parse into Content objectspublic boolean canParse(java.lang.String content)
canParse
in interface Parser
content
- The content to be testedpublic java.lang.String getParserType()
getParserType
in interface Parser
public static boolean isXML(java.lang.String content)
content
- The content to checkTrue
if the content is XMLpublic static java.lang.String getNormalisedForm(java.lang.String non_normalised)
non_normalised
- String to be correctly formattedpublic org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
resolveEntity
in interface org.xml.sax.EntityResolver
publicId
- The public identifer, or null if none is
available.systemId
- The system identifier provided in the XML
document.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.EntityResolver.resolveEntity(java.lang.String, java.lang.String)
public void unparsedEntityDecl(java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4) throws org.xml.sax.SAXException
unparsedEntityDecl
in interface org.xml.sax.DTDHandler
name
- The entity name.publicId
- The entity public identifier, or null if not
available.systemId
- The entity system identifier.notationName
- The name of the associated notation.DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void notationDecl(java.lang.String p1, java.lang.String p2, java.lang.String p3) throws org.xml.sax.SAXException
notationDecl
in interface org.xml.sax.DTDHandler
name
- The notation name.publicId
- The notation public identifier, or null if not
available.systemId
- The notation system identifier.DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.DocumentHandler
locator
- A locator for all SAX document events.DocumentHandler.setDocumentLocator(org.xml.sax.Locator)
,
Locator
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.startDocument()
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.endDocument()
public void startElement(java.lang.String name, org.xml.sax.AttributeList attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.DocumentHandler
name
- The element type name.attributes
- The specified or defaulted attributes.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.DocumentHandler
name
- The element type name.attributes
- The specified or defaulted attributes.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.endElement(java.lang.String)
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.DocumentHandler
ch
- The characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.DocumentHandler
ch
- The whitespace characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.DocumentHandler
target
- The processing instruction target.data
- The processing instruction data, or null if
none is supplied.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.processingInstruction(java.lang.String, java.lang.String)
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
e
- The warning information encoded as an exception.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ErrorHandler.warning(org.xml.sax.SAXParseException)
,
SAXParseException
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
e
- The warning information encoded as an exception.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ErrorHandler.warning(org.xml.sax.SAXParseException)
,
SAXParseException
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
e
- The error information encoded as an exception.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ErrorHandler.fatalError(org.xml.sax.SAXParseException)
,
SAXParseException
public static void main(java.lang.String[] args) throws java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |