Class XMLContentHandler
java.lang.Object
org.castor.xmlctf.xmldiff.xml.XMLContentHandler
- All Implemented Interfaces:
ContentHandler
A ContentHandler implementation that builds a tree of XMLNodes.
- Since:
- Castor 1.1
- Version:
- $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- Author:
- Edward Kuns
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] chars, int start, int length) Creates a new text node from incoming characters.voidSignals the end of the document.voidendElement(String uri, String name, String qName) Signals the end of an Element.voidendPrefixMapping(String prefix) Signals the end of prefix mapping.getRoot()Returns the Root node.voidignorableWhitespace(char[] chars, int start, int length) Ignores ignorable whitespace.voidprocessingInstruction(String target, String data) Creates a new Processing Instruction node.voidsetDocumentLocator(Locator locator) Configures the Locator we will use.voidskippedEntity(String name) Gives notification about a skipped Entity during XML parsing.voidSignals the beginning of the document.voidstartElement(String uri, String name, String qName, Attributes atts) Signals the beginning of an Element node.voidstartPrefixMapping(String prefix, String uri) Begins the scope of a prefix-URI Namespace mapping.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
XMLContentHandler
public XMLContentHandler()Creates a new XMLBuilder.
-
-
Method Details
-
characters
Creates a new text node from incoming characters.- Specified by:
charactersin interfaceContentHandler- Parameters:
chars- The character array containing the XML contentstart- First index of character for our new Text nodelength- count of characters for our Text node.- Throws:
SAXException- never
-
endDocument
Signals the end of the document.- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException- never
-
endElement
Signals the end of an Element.- Specified by:
endElementin interfaceContentHandler- Parameters:
uri- The namespace URIname- the local name of the element.qName- the qualified naem of the element- Throws:
SAXException- if we have a mismatched end element tag
-
endPrefixMapping
Signals the end of prefix mapping.- Specified by:
endPrefixMappingin interfaceContentHandler- Parameters:
prefix- The namespace prefix mapping that is ending- Throws:
SAXException- never
-
getRoot
-
ignorableWhitespace
Ignores ignorable whitespace.- Specified by:
ignorableWhitespacein interfaceContentHandler- Parameters:
chars- The character array containing the XML contentstart- First index of the ignorable whitespacelength- count of characters for the ignorable whitespace- Throws:
SAXException- never
-
processingInstruction
Creates a new Processing Instruction node.- Specified by:
processingInstructionin interfaceContentHandler- Parameters:
target- the target of the processing instructiondata- the content of the processing instruction- Throws:
SAXException- never
-
setDocumentLocator
Configures the Locator we will use.- Specified by:
setDocumentLocatorin interfaceContentHandler- Parameters:
locator- the Locator used by this DocumentHandler.
-
skippedEntity
Gives notification about a skipped Entity during XML parsing.- Specified by:
skippedEntityin interfaceContentHandler- Parameters:
name- the name of the skipped entity.
-
startDocument
Signals the beginning of the document.- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException- never
-
startElement
public void startElement(String uri, String name, String qName, Attributes atts) throws SAXException Signals the beginning of an Element node.- Specified by:
startElementin interfaceContentHandler- Parameters:
uri- The namespace URIname- the local name of the element.qName- the qualified naem of the elementatts- a list of attributes for this Element- Throws:
SAXException- If we are not given an element name.
-
startPrefixMapping
Begins the scope of a prefix-URI Namespace mapping.- Specified by:
startPrefixMappingin interfaceContentHandler- Parameters:
prefix- The namespace prefix mapping that is endinguri- The namespace URI- Throws:
SAXException- never
-