A simple serializer for XML documents.
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
Inserts a string of characters into the document.
ch
- The characters being inserted. A substring, to be precise.start
- Index of the first characterlength
- Number of characters being inserted
endDocument
public void endDocument()
throws SAXException
This method finishs the handlers action. After calling endDocument you
may start a new action by calling startDocument again.
endElement
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
Terminates an element.
namespaceURI
- The namespace URI, if any, or nulllocalName
- The local name, without prefix, or nullqName
- The qualified name, including a prefix, or null
endPrefixMapping
public void endPrefixMapping(String prefix)
throws SAXException
Terminates use of a namespace prefix.
prefix
- The prefix being abandoned.
getDocumentLocator
public Locator getDocumentLocator()
Returns the locator
- A locator previously set with setDocumentLocator or null.
getMarshaller
public JMMarshallerImpl getMarshaller()
Returns the JaxbXMLSerializers Marshaller.
getWriter
public Writer getWriter()
Returns the JaxbXMLSerializers Writer.
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
Calls the character method with the same arguments.
ch
- A string of whitespace characters being inserted into the document.start
- The index of the first character.length
- The number of characters.
processingInstruction
public void processingInstruction(String target,
String data)
throws SAXException
Inserts a processing instruction.
target
- The PI targetdata
- The PI data
setDocumentLocator
public void setDocumentLocator(Locator pLocator)
Sets the locator.
pLocator
- A locator for use in case of errors
skippedEntity
public void skippedEntity(String ent)
throws SAXException
Not actually implemented, because I don't know how to skip entities.
ent
- The entity being skipped.
startDocument
public void startDocument()
throws SAXException
Starts a document.
startElement
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes attr)
throws SAXException
Starts a new element.
namespaceURI
- The namespace URI, if any, or nulllocalName
- The local name, without prefix, or nullqName
- The qualified name, including a prefix, or nullattr
- The element attributes
startPrefixMapping
public void startPrefixMapping(String prefix,
String namespaceURI)
throws SAXException
Starts use of a namespace prefix.
prefix
- The prefixnamespaceURI
- The namespace URI