| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
| +--org.jdom.input.SAXHandler
Constructor Summary | |
SAXHandler(Document document) This will set the Document to use. |
Method Summary | |
void | characters(char[] ch, int start, int end) This will report character data (within an element). |
void | comment(char[] ch, int start, int end) This reports that a comments is parsed. |
void | endCDATA() Report a CDATA section - ignored in SAXBuilder. |
void | endDTD() This signifies that the reading of the DTD is complete. |
void | endElement(String namespaceURI, String localName, String rawName) Indicates the end of an element ( </[element name]> ) is reached. |
void | endEntity(String name) |
void | endPrefixMapping(String prefix) This will add the prefix mapping to the JDOM Document object. |
void | processingInstruction(String target, String data) This will indicate that a processing instruction (other than the XML declaration) has been encountered. |
void | startCDATA() Report a CDATA section - ignored in SAXBuilder. |
void | startDTD(String name, String publicId, String systemId) This will signify that a DTD is being parsed, and can be used to ensure that comments and other lexical structures in the DTD are not added to the JDOM Document
object. |
void | startElement(String namespaceURI, String localName, String qName, Attributes atts) This reports the occurrence of an actual element. |
void | startEntity(String name) |
void | startPrefixMapping(String prefix, String uri) This will add the prefix mapping to the JDOM Document object. |
Constructor Detail |
public SAXHandler(Document document)
throws java.io.IOException
This will set the Document
to use.
Document
being parsed.IOException
- when errors occur.Method Detail |
public void characters(char[] ch, int start, int end)
throws SAXException
This will report character data (within an element).
char[]
character array with character dataint
index in array where data starts.int
index in array where data ends.SAXException
- when things go wrongpublic void comment(char[] ch, int start, int end)
throws SAXException
This reports that a comments is parsed. If not in the
DTD, this comment is added to the current JDOM
Element
, or the Document
itself
if at that level.
ch[]
array of comment characters.int
index to start reading from.int
index to end reading at.public void endCDATA()
throws SAXException
Report a CDATA section - ignored in SAXBuilder.
public void endDTD()
throws SAXException
This signifies that the reading of the DTD is complete.
public void endElement(String namespaceURI, String localName, String rawName)
Indicates the end of an element
(</[element name]>
) is reached. Note that
the parser does not distinguish between empty
elements and non-empty elements, so this will occur uniformly.
String
URI of namespace this
element is associated withString
name of element without prefixString
name of element in XML 1.0 formSAXException
- when things go wrongpublic void endEntity(String name)
throws SAXException
public void endPrefixMapping(String prefix)
throws SAXException
This will add the prefix mapping to the JDOM
Document
object.
String
namespace prefix.String
namespace URI.public void processingInstruction(String target, String data)
throws SAXException
This will indicate that a processing instruction (other than the XML declaration) has been encountered.
String
target of PIString
Throws:SAXException
- when things go wrongpublic void startCDATA()
throws SAXException
Report a CDATA section - ignored in SAXBuilder.
public void startDTD(String name, String publicId, String systemId)
throws SAXException
This will signify that a DTD is being parsed, and can be
used to ensure that comments and other lexical structures
in the DTD are not added to the JDOM Document
object.
String
name of element listed in DTDString
public ID of DTDString
syste ID of DTDpublic void startElement(String namespaceURI, String localName, String qName, Attributes atts)
throws SAXException
This reports the occurrence of an actual element. It will include
the element's attributes, with the exception of XML vocabulary
specific attributes, such as
xmlns:[namespace prefix]
and
xsi:schemaLocation
.
String
namespace URI this element
is associated with, or an empty
String
String
name of element (with no
namespace prefix, if one is present)String
XML 1.0 version of element name:
[namespace prefix]:[localName]Attributes
list for this elementSAXException
- when things go wrongpublic void startEntity(String name)
throws SAXException
public void startPrefixMapping(String prefix, String uri)
throws SAXException
This will add the prefix mapping to the JDOM
Document
object.
String
namespace prefix.String
namespace URI.Association Links |
Document
object being builtto Class java.util.Stack
to Class java.util.LinkedList
to Class java.util.LinkedList
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |