| java.lang.Object |
| ↳ |
org.xml.sax.helpers.DefaultHandler |
| |
↳ |
com.atlassian.confluence.it.export.XmlSiteExportHandler |
Class Overview
A SAX handler for processing the XML component of a site export and building some simple mappings
of the found pages and spaces, suitable for validating Site export tests. You should note that a large
site export will lead to large memory usage so use it for small test sites only. It's also pretty quick and nasty
but you'll see that for yourself.
Summary
| Public Methods |
|
void
|
characters(char[] ch, int start, int length)
Note that a SAX driver is free to chunk the character data any way it wants, so you cannot count on all
of the character data content of an element arriving in a single characters event.
|
|
void
|
endElement(String uri, String localName, String name)
If this is the end of an object element and we have a current item then store it.
|
|
SimpleSiteStructure
|
getStructure()
When called after parsing is complete it will return the SimpleSiteStructure which has been
constructed.
|
|
void
|
startDocument()
|
|
void
|
startElement(String uri, String localName, String name, Attributes attributes)
Does not expect or handle nested object elements.
|
|
[Expand]
Inherited Methods |
From class
org.xml.sax.helpers.DefaultHandler
|
void
|
characters(char[] arg0, int arg1, int arg2)
|
|
void
|
endDocument()
|
|
void
|
endElement(String arg0, String arg1, String arg2)
|
|
void
|
endPrefixMapping(String arg0)
|
|
void
|
error(SAXParseException arg0)
|
|
void
|
fatalError(SAXParseException arg0)
|
|
void
|
ignorableWhitespace(char[] arg0, int arg1, int arg2)
|
|
void
|
notationDecl(String arg0, String arg1, String arg2)
|
|
void
|
processingInstruction(String arg0, String arg1)
|
|
InputSource
|
resolveEntity(String arg0, String arg1)
|
|
void
|
setDocumentLocator(Locator arg0)
|
|
void
|
skippedEntity(String arg0)
|
|
void
|
startDocument()
|
|
void
|
startElement(String arg0, String arg1, String arg2, Attributes arg3)
|
|
void
|
startPrefixMapping(String arg0, String arg1)
|
|
void
|
unparsedEntityDecl(String arg0, String arg1, String arg2, String arg3)
|
|
void
|
warning(SAXParseException arg0)
|
|
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
org.xml.sax.ContentHandler
|
abstract
void
|
characters(char[] arg0, int arg1, int arg2)
|
|
abstract
void
|
endDocument()
|
|
abstract
void
|
endElement(String arg0, String arg1, String arg2)
|
|
abstract
void
|
endPrefixMapping(String arg0)
|
|
abstract
void
|
ignorableWhitespace(char[] arg0, int arg1, int arg2)
|
|
abstract
void
|
processingInstruction(String arg0, String arg1)
|
|
abstract
void
|
setDocumentLocator(Locator arg0)
|
|
abstract
void
|
skippedEntity(String arg0)
|
|
abstract
void
|
startDocument()
|
|
abstract
void
|
startElement(String arg0, String arg1, String arg2, Attributes arg3)
|
|
abstract
void
|
startPrefixMapping(String arg0, String arg1)
|
|
From interface
org.xml.sax.DTDHandler
|
From interface
org.xml.sax.EntityResolver
|
abstract
InputSource
|
resolveEntity(String arg0, String arg1)
|
|
From interface
org.xml.sax.ErrorHandler
|
abstract
void
|
error(SAXParseException arg0)
|
|
abstract
void
|
fatalError(SAXParseException arg0)
|
|
abstract
void
|
warning(SAXParseException arg0)
|
|
Public Constructors
public
XmlSiteExportHandler
()
Public Methods
public
void
characters
(char[] ch, int start, int length)
Note that a SAX driver is free to chunk the character data any way it wants, so you cannot count on all
of the character data content of an element arriving in a single characters event.
public
void
endElement
(String uri, String localName, String name)
If this is the end of an object element and we have a current item then store it. Nested object elements
would confuse things.
When called after parsing is complete it will return the SimpleSiteStructure which has been
constructed.
Returns
- the structure created or null if parsing has not been performed.
public
void
startDocument
()
public
void
startElement
(String uri, String localName, String name, Attributes attributes)
Does not expect or handle nested object elements. If one is encountered then any parsing of outer object will be lost.